分类
linux mac

zsh .zprofile

从 macOS Catalina 开始,zsh 成为了默认 shell

https://support.apple.com/en-us/HT208050

.zprofile 相当于 .bash_profile
.zshrc 相当于 .bashrc

zsh compinit: insecure directories, run compaudit for list.
Ignore insecure directories and continue [y] or abort compinit [n]? ccompinit: initialization aborted
complete:13: command not found: compdef
complete:13: command not found: compdef
complete:13: command not found: compdef
检查$ compaudit
There are insecure directories:
/usr/local/share/zsh/site-functions
/usr/local/share/zsh

修复

chown -R "$(whoami)" /usr/local/share/zsh/site-functions /usr/local/share/zsh
chmod 755 /usr/local/share/zsh/site-functions /usr/local/share/zsh
分类
life

2020读书清单

目标30本书,单线程模式,切记不要并发,不要同时读多本书

月份 技术书 非技术书
2020-02-02 云原生服务网格 Istio
2020-03-02 寂静的春天
分类
ansible

ansible 不 check host key

初始化的时候,要批量用密码登一遍执行初始化,不想 check host key

ANSIBLE_HOST_KEY_CHECKING=False ansible all -i my_inventory -m ping -k

分类
python

pip 源

douban

pip install requests -i https://pypi.douban.com/simple

aliyun

pip install requests -i https://mirrors.aliyun.com/pypi/simple

私有 nexus 源

pip install requests -i https://nexus.example.com/nexus/repository/pip-internal/simple

分类
mac

brew 切换 node 版本

现在默认安装的 node 是 13 版本,因为要用 12 版本,进行如下操作

安装 12 版本

brew install node@12

查看所有 node 版本

brew ls --versions | grep node

node 13.1.0
node@12 12.13.1

切换为 12 版本

brew unlink node
rm -f '/usr/local/bin/npm'
rm -f '/usr/local/bin/npx'
rm -rf /usr/local/lib/node_modules
brew link --force node@12