使用 git show 可以看到一条commit的详情:
如下所示:
Serverless应用一般都是微服务架构,项目会比较多,域名管理比较复杂。
本文提出了一种便捷的Serverless应用域名管理方案。
此方案基于 AWS 平台,使用 Serverless 框架及其周边生态实现。使用其它平台或框架的读者请酌情参考。
| location /foo { | |
| rewrite /foo/(.*) /$1 break; | |
| proxy_pass http://localhost:3200; | |
| proxy_redirect off; | |
| proxy_set_header Host $host; | |
| } |
| # replace ${server} with backend host. | |
| # sed -i -e 's/\${server}/my-backend.my-domain.com/' nginx.conf | |
| upstream backend { | |
| server ${server}; # this line will be replaced with real value | |
| } | |
| server { | |
| location / { | |
| root /var/www; | |
| index index.html; |
| sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list \ | |
| && sed -i s@/security.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list | |
| sed -i s@/deb.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list \ | |
| && sed -i s@/security.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list |
| // change host / port / protocol to your real values | |
| const axiosOptions: AxiosRequestConfig = {} | |
| const httpsAgent = new SocksProxyAgent({ | |
| host: '127.0.0.1', | |
| port: 1086, | |
| protocol: 'socks5:', | |
| rejectUnauthorized: false | |
| }) | |
| axiosOptions.httpAgent = httpsAgent |
| { | |
| "registry-mirrors": ["https://registry.docker-cn.com"] | |
| } |
git clone https://github.com/owner/git.git
git clone [email protected]:owner/git.git
| 在开发前端应用时,经常会安装 node_modules,文件系统中突然增加很多细碎的文件。 | |
| 有时候这会触发macOS的自动索引,即 mds 进程,耗费大量的CPU。 | |
| 有一个方法可以禁用mds对此目录的监听,建立一个名为 .metadata_never_index 的文件即可 |