- C-a == Ctrl-a
- M-a == Alt-a
:q close
:w write/saves
:wa[!] write/save all windows [force]
:wq write/save and close
# As root user | |
sudo su | |
# Update the OS | |
apt-get update -y | |
# Add this to ~/.bashrc to remove timezone warnings | |
export LC_ALL="en_US.UTF-8" | |
source ~/.bashrc |
[user] | |
name = Tanyb | |
email = [email protected] | |
[core] | |
editor = vim | |
[alias] | |
ci = commit -a -v | |
co = checkout | |
st = status | |
br = branch |
upstream example-webpack { | |
server 127.0.0.1:8080; | |
} | |
upstream example-backend { | |
server 127.0.0.1:3000; | |
} | |
server { | |
listen 80; |
upstream backend { | |
server localhost:5000; | |
} | |
server { | |
listen 80; | |
listen [::]:80; | |
root /var/www/client/build; | |
index index.html index.htm index.nginx-debian.html; |
apt-get update | |
apt-get install -y | |
## Add this to ~/.bashrc to remove timezone warnings | |
export LC_ALL="en_US.UTF-8" | |
source ~/.bashrc | |
node_modules | |
build | |
npm-debug.log | |
.env | |
.DS_Store |
当我们brew update或者brew install xxx时,异常的慢,本事原因还是国内网络环境github下载慢导致。 | |
我们可以更换Homebrew源, 从https://mirrors.ustc.edu.cn/上搜索各对应的源 | |
cd "$(brew --repo)" (正常放置在/usr/local/Homebrew) | |
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git/ | |
# 替换homebrew-core | |
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" | |
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git/ |
POWERLEVEL9K_MODE=nerdfont-complete | |
POWERLEVEL9K_PROMPT_ON_NEWLINE=true | |
POWERLEVEL9K_RPROMPT_ON_NEWLINE=true | |
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2 | |
POWERLEVEL9K=truncate_beginning | |
POWERLEVEL9K_TIME_BACKGROUND=black | |
POWERLEVEL9K_TIME_FOREGROUND=white | |
POWERLEVEL9K_TIME_FORMAT=%D{%I:%M} | |
POWERLEVEL9K_STATUS_VERBOSE=false | |
POWERLEVEL9K_VCS_CLEAN_FOREGROUND=black |
参考 https://mirror.tuna.tsinghua.edu.cn/help/CocoaPods/ | |
对于旧版的 CocoaPods 可以使用如下方法使用 tuna 的镜像: | |
``` | |
$ pod repo remove master | |
$ pod repo add master https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git | |
$ pod repo update | |
``` | |
新版的 CocoaPods 不允许用pod repo add直接添加master库了,但是依然可以: |