默认是 1087(不是 1086 也不是 1089)
1 | export http_proxy='http://127.0.0.1:1087' |
测试地址
1 | curl https://www.bbc.com/ |
写入 ~/.zshrc
1 | alias p10='export http_proxy="http://127.0.0.1:1087";export https_proxy=$http_proxy;echo -e 已开启代理' |
或者
1 | function proxy(){ |
注意 = 后面不能有空格!!!!
export http_proxy=这里不能有空格’http://127.0.0.1:1087'
shell 颜色语法
1 | \e |
- https://misc.flogisoft.com/bash/tip_colors_and_formatting
- https://www.codegrepper.com/code-examples/shell/bash+echo+color
tput 颜色
1 | red=`tput setaf 1` |
1 | echo "$(tput setaf 1)Red text $(tput setab 7)and white background$(tput sgr 0)" |
tput setab [1-7] # Set the background colour using ANSI escape
tput setaf [1-7] # Set the foreground colour using ANSI escape
Num Colour #define R G B
0 black COLOR_BLACK 0,0,0
1 red COLOR_RED 1,0,0
2 green COLOR_GREEN 0,1,0
3 yellow COLOR_YELLOW 1,1,0
4 blue COLOR_BLUE 0,0,1
5 magenta COLOR_MAGENTA 1,0,1
6 cyan COLOR_CYAN 0,1,1
7 white COLOR_WHITE 1,1,1
字符画
1 | ,--, .-. .-. .---. .---. .-. .-..-. .-. .--. .-. .-. ,--, |
- http://patorjk.com/software/taag/#p=display&f=Banner3-D&t=guoshuang
- http://www.network-science.de/ascii/
vscode 命令行
Command+Shift+p 输入 shell
选择 install code command in path
在终端打开项目
1 | code 目录名 |
原理
其实是放了链接
1 | /usr/local/bin |
查看
1 | which code |
其他方式
1 | open -a "Visual Studio Code" |
vsode 根据项目修改颜色
https://dockyard.com/blog/2019/07/15/follow-these-steps-to-enable-vs-code-color-customization
编辑 .vscode/settings.json
1 | { |
加入 .gitignore
Open Terminal
Run touch ~/.gitignore_global to create a global .gitignore file in your home directory
Run open ~/.gitignore_global to open the file
Add .vscode/ to the file
Run git config –global core.excludesfile ~/.gitignore_global