Author: jpuyy

  • 阿里云挂载本地路径使用

    oss 里授权用户

    /usr/local/bin/ossfs data-backup /oss -ourl=http://oss-cn-shanghai.aliyuncs.com -o allow_other

  • zsh .zprofile

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

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

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


    fix error
    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
    


    2023-03-16 fix error

    Last login: Thu Mar 16 14:35:14 on ttys010
    [9]    47765 illegal hardware instruction  sed --version 2>&1 | 
           47766 exit 1                        grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox} -q GNU
    

    fixed by updating file `oh-my-zsh.sh`

    omz update
    

    preferred zsh themes

    ZSH_THEME="random"                                                                         
    # Set list of themes to pick from when loading at random                        
    # Setting this variable when ZSH_THEME=random will cause zsh to load            
    # a theme from this variable instead of looking in ~/.oh-my-zsh/themes/         
    # If set to an empty array, this variable will have no effect.                  
    ZSH_THEME_RANDOM_CANDIDATES=(rkj-repos cloud)
    
  • 2020读书清单

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

    月份 技术书 非技术书
    2020-02-02 云原生服务网格 Istio  
    2020-03-02   寂静的春天
    2020-05-11   你当像鸟飞往你的山
    2020-05-25   无缘社会
    2020-06-10   呐喊
    2020-06-20   坏小孩
    2020-07-01   无证之罪
    2020-09-01   当呼吸化为空气
    2020-10-15   褚时健传
    2020-12-20   软技能

     

  • ansible 不 check host key

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

    ANSIBLE_HOST_KEY_CHECKING=False ansible all -i my_inventory -m ping -k
    
    
  • 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
    
    
  • 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