Skip to content

Commit 131e778

Browse files
committed
git go
1 parent 72cf778 commit 131e778

File tree

9 files changed

+222
-3
lines changed

9 files changed

+222
-3
lines changed

01语言/1go/6注意点.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,4 +503,43 @@ sn3:= struct {
503503
- 读已经关闭的chan能一直读到东西,但是读到的内容根据通道内关闭前是否有元素而不同。
504504
- 如果chan关闭前,buffer内有元素还未读,会正确读到chan内的值,且返回的第二个bool值(是否读成功)为true。
505505
- 如果chan关闭前,buffer内有元素已经被读完,chan内无值,接下来所有接收的值都会非阻塞直接成功,返回 channel 元素的零值,但是第二个bool值一直为false。
506-
- 写已经关闭的chan会panic
506+
- 写已经关闭的chan会panic
507+
508+
### 私有仓库
509+
510+
```shell
511+
# 报错:github.com/hashicorp/memberlist: git.****.cn/****/xxx/****-@v1.0.1: reading https://goproxy.cn/git.****.cn/****/xxx/****-.mod: 404 Not Found
512+
# 设置私有仓库的git地址
513+
go env -w GOPRIVATE="git.xxx.cn"
514+
515+
# 允许设置不安全访问,配置后可请求到 http 地址的仓库
516+
go env -w GOINSECURE="git.xxx.cn"
517+
518+
# 设置请求该地址不需要代理,即GOPROXY
519+
go env -w GONOPROXY="git.xxx.cn"
520+
521+
# 设置不验证sum包的签名
522+
go env -w GONOSUMDB="git.xxx.cn"
523+
524+
# 项目名称必须是仓库地址
525+
#拉取仓库go get git.xxx.cn/name/xxx@v1.0.2
526+
527+
```
528+
- 鉴权问题
529+
```shell
530+
fatal: could not read Username for 'https://git.****.cn': No such device or address
531+
# cat >~/.netrc<<EOF
532+
machine git.xxxx.cn
533+
login ${GITLAB_USER_NAME}
534+
password ${GITLAB_PASSWORD}
535+
EOF
536+
537+
cat >~/.gitconfig<<EOF
538+
[user]
539+
name = xxx
540+
email = ${GITLAB_USER_NAME}
541+
EOF
542+
543+
```
544+
-
545+

02数据存取/5Redis.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,8 @@
6464
- Nginx 多进程单线程
6565
- Memcached 单进程多线程模型
6666

67+
#### String和Hash(ziplist),什么情况下用Hash更省内存。
68+
69+
- 哈希对象保存的所有键值对的键和值的字符串长度都小于 64 字节;
70+
- 哈希对象保存的键值对数量小于 512 个;
71+

06工具/1git/3常见问题.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# 常见问题
2+
3+
-
4+

06工具/list.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
3. https://v2xtls.org/v2ray%e5%ae%a2%e6%88%b7%e7%ab%af/ 科学上网 https://freefq.com/
44
4. https://natapp.cn 端口映射 xiaomeng79 mqf19890715_null
55
6. https://www.geogebra.org/ 数学画图工具
6-
7. https://www.yunpanjingling.com/ 云盘资料
6+
7. https://www.yunpanjingling.com/ 云盘资料
7+
8. https://github.com/immersive-translate/immersive-translate 翻译

13区块链/2资料.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
## 系统性
44

5+
- [区块链技术和应用](https://www.bilibili.com/video/BV1Vt411X7JF/?spm_id_from=333.337.search-card.all.click)
56
- [企业级区块链实战教程](https://learnblockchain.cn/books/enterprise/)
7+
- [以太坊设计与实现](https://learnblockchain.cn/books/geth/)
68

79

810
## 名词

13区块链/infura.csv

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
邮箱,key,备注,
2+
hbfxd0@sina.com,f2b3076c1d234c698b0a23953e9a06a7,,
3+
ltjzb6@sina.com--ww12345,02f7c87e89774dca8f44893a4458d5ef,,
4+
xfnfj8@sina.com--ww12345,9c362c367df94b15be91b80fc07cebc6,,
5+
zvhzh4@sina.com--ww12345,c8947d1407c34c4ea8ac7794fdff3de7,,
6+
xzptz2@sina.com--ww12345,f0c34afe908947329308c80017c33438,,
7+
phdbd8@sina.com--ww12345,0471898a6b294a6899f3bbb895a2c0ca,,
8+
xnjpx6@sina.com--ww12345,66616cc0cc134ba9a9b3094181652175,,
9+
zbrlj8@sina.com--ww12345,650e0689f1f642cbabf7a75dc0733690,,8a2f0be3a8844a11973660dd5c0ead16
10+
tzxnj0@sina.com--ww12345,97fd88f74c68454e8fbe96c2caab83bf,,
11+
pffjl2@sina.com--ww12345,fd735cf177194daebe8ad811b0f8a6dc,,
12+
hdnpz4@sina.com--ww12345,0e7e8447a506442a96e8a723a826b44c,,
13+
bpjdb6@sina.com--ww12345,f488a759decf425b9014ec4c0ab01930,,
14+
zlzxd0@sina.com--ww12345,c417ddfb093e429fbb745dd993d97828,,
15+
vjxrn2@sina.com--ww12345,6c9d1f106b404dabb5f95997ca4e844a,,
16+
rtdbj8@sina.com--ww12345,077a9cb3939745e2aba8fdb77965647e,,
17+
jldhn4@sina.com--ww12345,73d61f8844144ab0ae112e9bf1604d86,,
18+
lhlbh0@sina.com--ww12345,28281dcf228644e29621e3b11a1cfd31,,
19+
lnfjj2@sina.com--ww12345,656784a342234009b6131ca3388aff89,,
20+
hdndz8@sina.com--ww12345,8a9c59818b5b45968231b403c46e6631,,
21+
jrvpn2@sina.com--ww12345,bffd5a9e9b524ce0a27bafab52428ced,,
22+
rrrhb4@sina.com--ww12345,04518f74488d4817a0ea0c1e6bf8b6b3,,
23+
bhfxd8@sina.com--ww12345,8ad5e203d1414b03a6f586e7d7a37fe3,,
24+
xfrvf6@sina.com--ww12345,bf518d96f06d4801ac330f051a2c59bf,,
25+
fxvnv0@sina.com--ww12345,537367c54f7c4efbb6cc59c1d224d4d0,,
26+
bhprv4@sina.com--ww12345,776a6d4a15b34b1bb8590aacf65add7a,,
27+
rlhjz2@sina.com--ww12345,3ddf2f3e6406450782e883718865f4a7,,
28+
hbvnv0@sina.com--ww12345,bcca246adfb040029015c0a86dddc1f0,,
29+
tptlj8@sina.com--ww12345,37c6c48b8df04cc6a23a1fe2de2ce7a8,,
30+
pjlvv6@sina.com--ww12345,20e502c759c740a4851daa14988c7a80,,
31+
rltlr4@sina.com--ww12345,34bbb54e851d4ac5a86cd8292503a448,,
32+
vftzv2@sina.com--ww12345,,,
33+
ftjnv8@sina.com--ww12345,,,
34+
jzlpb0@sina.com--ww12345,dbf66aabf5324c79837257be6cd7d26f,,
35+
ffvlr6@sina.com--ww12345,ff0f40dd424e473eaad8477e4d25d1ee,,
36+
oiwme2@sina.com--ww12345,,,
37+
lmwck4@sina.com--ww12345,71328cf7de124590950f233ed65a4066,,
38+
okkws8@sina.com--ww12345,61e2dabb79ea43cf9213a606d2817ca5,,
39+
mmoya3@sina.com--ww12345,4c43d8b0a6804c0d96934b210dc55f6c,,
40+
ykmue2@sina.com--ww12345,43e425b0e68b407f83a4af21a81c61c8,,
41+
ceayg9@sina.com--ww12345,998cc535b20b49d891f7b1133f509a8d,,
42+
meyos3@sina.com--ww12345,1d67a1aa4b1246e8bbfa4d038dd1065c,,
43+
iugow8@sina.com--ww12345,3dbaccd345fc404087d6b395e1a06c01,,
44+
wymyy9@sina.com--ww12345,1dbf86bdc27e4330960e162c159cc52e,,
45+
aagyi7@sina.com--ww12345,5af9c477dc7d4920b0ebe76cfd58e7c8,,
46+
uwoku1@sina.com--ww12345,111d48cdd74e4ec6a383c8fdee32b177,,
47+
kqicg3@sina.com--ww12345,3274821f397c4584bbee74db3eb8460c,,
48+
eosqk1@sina.com--ww12345,dabce771b5a14e6eae230a7c9366e6bc,,
49+
egecy7@sina.com--ww12345,019af01672af43d0a5f84ee9853e099b,,
50+
iimwu3@sina.com--ww12345,c98a5a8ace5e42fa8db663097b166f9c,,
51+
sucmk5@sina.com--ww12345,2815e0d1d4c041e380123f2d28f4884c,,
52+
msgay7@sina.com--ww12345,f7c35ca1db5544cfb8288bd4a4178588,,
53+
aowgs5@sina.com--ww12345,20a9df9b45924ea6bcab173cd9eb438e,,
54+
wiomk1@sina.com--ww12345,244ae536c72c4b2ebb287dadce2526b2,,
55+
"aqigq9@sina.com--ww12345
56+
kogec3@sina.com--ww12345
57+
ksmwq9@sina.com--ww12345",6a72341471dc466594139b190ad4be63,187d4665fe9f4ffdbd8da8282a24877f,3415a800a16043009cff6e5993ac2829
58+
qqgwc3@sina.com--ww12345,b5262c6961a34feb8ba5040837f4f415,,
59+
gumog7@sina.com--ww12345,cb67e5aa691e4157860ad0a6bd9abf81,,
60+
sqcaw9@sina.com--ww12345,0617e20fe4d149a998c22c89bd25c4f5,,
61+
eumos5@sina.com--ww12345,c8a9888dac3c43ecbf891637f5cc3147,,
62+
giygi7@sina.com--ww12345,ba5179ee5b644194a609c91ca5e5adca,,
63+
aqkcm5@sina.com--ww12345,efddb7afb55f4b879bcc258b69cae2ad,,

17基础设施/nginx.conf

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Nginx多环境配置
2+
3+
```conf
4+
5+
upstream 2879137 {
6+
server 172.18.0.4:31233;
7+
}
8+
9+
upstream 3383230 {
10+
server 172.18.0.4:22399;
11+
}
12+
13+
upstream main-latest {
14+
server 172.18.0.4:27146;
15+
}
16+
17+
18+
server {
19+
listen 80;
20+
server_name ~^(?<subdomain>.+)\.test\.xxx\.cn$;
21+
22+
location / {
23+
set $path /root/web/$subdomain;
24+
if (!-d /root/web/$subdomain) {
25+
# 如果前端项目未部署代码,使用默认目录下的前端资源。
26+
set $path /root/web/backend-endpoint;
27+
}
28+
root $path;
29+
index index.html;
30+
if ($uri != "/") {
31+
rewrite ^/(.*)/ /$1/index.html break;
32+
}
33+
}
34+
35+
location /api {
36+
proxy_redirect off;
37+
proxy_http_version 1.1;
38+
proxy_set_header Upgrade $http_upgrade;
39+
proxy_set_header Connection "upgrade";
40+
proxy_set_header Host $host;
41+
proxy_set_header X-Real-IP $remote_addr;
42+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
43+
44+
proxy_pass http://$subdomain;
45+
proxy_connect_timeout 1200s;
46+
proxy_send_timeout 1200s;
47+
proxy_read_timeout 1200s;
48+
proxy_request_buffering off;
49+
proxy_buffering off;
50+
client_max_body_size 20m;
51+
52+
proxy_next_upstream error timeout http_500 http_502;
53+
54+
error_page 502 = @502;
55+
}
56+
57+
location @502 {
58+
# 如果后端未部署对应的代码,则重定向到默认的 main-latest 服务。
59+
add_header 'Access-Control-Allow-Origin' * always;
60+
add_header 'Access-Control-Allow-Credentials' true always;
61+
add_header 'Access-Control-Allow-Methods' * always;
62+
add_header 'Access-Control-Allow-Headers' 'Content-Type,*' always;
63+
add_header 'Access-Control-Request-Headers' 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
64+
65+
if ($request_method = 'OPTIONS') {
66+
return 204;
67+
}
68+
69+
proxy_redirect off;
70+
proxy_http_version 1.1;
71+
proxy_set_header Upgrade $http_upgrade;
72+
proxy_set_header Connection "upgrade";
73+
proxy_set_header Host $host;
74+
proxy_set_header X-Real-IP $remote_addr;
75+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
76+
77+
proxy_pass http://main-latest;
78+
proxy_connect_timeout 1200s;
79+
proxy_send_timeout 1200s;
80+
proxy_read_timeout 1200s;
81+
proxy_request_buffering off;
82+
proxy_buffering off;
83+
client_max_body_size 20m;
84+
85+
proxy_next_upstream error timeout http_500 http_502;
86+
}
87+
}
88+
```

27书籍资料/0目录.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- 罗伯特 富爸爸穷爸爸(一起学习财富思路)
1515
- 历代经济变革得失(吴晓波)
1616
- [精益副业](http://r.ftqq.com/lean-side-bussiness)
17+
- [如何不靠运气变得富有](https://github.com/fat-garage/how-to-get-rich-without-getting-lucky)
1718

1819
## 哲理
1920

@@ -40,5 +41,4 @@
4041

4142
## 免费获取书籍的方法
4243

43-
- [pdf大全](https://www.pdfdaquan.com/)
4444
- [书行天下](https://www.sxpdf.com/)

33科学上网/目录.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# 科学上网
2+
3+
## 订阅相关
4+
- [sub-web](https://github.com/CareyWang/sub-web)
5+
- [subconverter](https://github.com/tindy2013/subconverter)
6+
- [ACL4SSR](http://github.com/ACL4SSR/ACL4SSR)
7+
- [分享链接格式](https://github.com/2dust/v2rayN/wiki/%E5%88%86%E4%BA%AB%E9%93%BE%E6%8E%A5%E6%A0%BC%E5%BC%8F%E8%AF%B4%E6%98%8E(ver-2))
8+
- [v2rayse](https://v2rayse.com/c/%E8%BD%AC%E6%8D%A2%E5%B7%A5%E5%85%B7/)
9+
- [v2ray-examples](https://github.com/v2fly/v2ray-examples)
10+
11+
## 工具准备
12+
13+
- [godaddy](https://www.godaddy.com/zh-sg) 域名购买
14+
- [cloudflare](https://www.cloudflare.com/zh-cn/) CDN
15+
- [ProxyTool](https://github.com/githubvpn007/ProxyTool)
16+
- [fhs-install-v2ray](https://github.com/v2fly/fhs-install-v2ray) 安装v2ray
17+
- [v2ray-core](https://github.com/v2fly/v2ray-core)

0 commit comments

Comments
 (0)