Skip to content

Commit ef5395a

Browse files
author
wuaoxiang
committed
add curl redirect
1 parent e9e8510 commit ef5395a

File tree

4 files changed

+27
-7
lines changed

4 files changed

+27
-7
lines changed

2021/09/database_system_concept_1.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ inspect($$('#viewerContainer')[0])
1010

1111
## relational algebra review
1212

13-
| operator | SQL |
14-
| --- | --- |
15-
| select | WHERE predicate |
16-
| projection | SELECT |
13+
relational algebra 学术上用于无重复的数据集合/records,但现代数据库允许表中有重复行,因此可以推广到
14+
15+
| operator | Greek letter | SQL | notes |
16+
| --- | --- | --- | --- |
17+
| select | sigma(σ) | WHERE predicate | and(∧) or(∨) not(¬) |
18+
| projection | pi(Π) | SELECT |
19+
| Cartesian-product | cross(x) |
1720

1821
## words
1922

2021/12/curl_redirect.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# [curl -L follow redirect](2021/12/curl_redirect.md)
2+
3+
curl 下载文件后 tar xzf 解压提示格式不对,发现下载的文件大小只有 4kb 再 cat 去看发现原来是一个重定向的 CDN 链接
4+
5+
curl 加上 -L 参加即可 follow redirect 如下就能看到 curl 下载的第一个文件是一个重定向的链接第二个才是真正的问
6+
7+
```
8+
Step 5/40 : RUN curl -O -L https://npm.taobao.org/mirrors/node/latest-v16.x/node-v16.0.0-linux-x64.tar.gz
9+
---> Running in a74ccd5469d8
10+
% Total % Received % Xferd Average Speed Time Time Time Current
11+
Dload Upload Total Spent Left Speed
12+
100 187 100 187 0 0 816 0 --:--:-- --:--:-- --:--:-- 816
13+
100 31.7M 100 31.7M 0 0 2796k 0 0:00:11 0:00:11 --:--:-- 3424k
14+
```

2021/12/docker_could_not_resolve_host.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_6
1111

1212
这种问题就是 docker container 的 DNS 问题
1313

14-
在 /etc/docker/daemon.json 中加上
14+
在 /etc/docker/daemon.json 中加上(国内网络别用谷歌的 DNS)
1515

1616
```
1717
"dns" : [
18-
"114.114.114.114",
19-
"8.8.8.8"
18+
"119.29.29.29",
19+
"114.114.114.114"
2020
]
2121
```
2222

2323
然后 sudo systemctl restart docker 就能用了
24+
25+
**如果本机发生过 OpenVPN 网络切换,需要 restart docker 才能让 container 网络访问正常**

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
- [归档 - 吴翱翔的博客](/)
22
- **2021-12**
3+
- [curl -L follow redirect](2021/12/curl_redirect.md)
34
- [docker - resolve host](2021/12/docker_could_not_resolve_host.md)
45
- [/proc/swaps](2021/12/proc_swaps.md)
56
- **2021-11**

0 commit comments

Comments
 (0)