ata
发布于 2023-08-25 / 51 阅读
0
0

Cheetsheet

Cheetsheet

  • 安装 NVM 到全局目录
# 新建 nvm 目录
mkdir /usr/local/nvm
# 安装到此目录下
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | NVM_DIR=/usr/local/nvm bash
# 将加载 nvm 的命令写到全局用户配置
echo -e "export NVM_DIR=\"/usr/local/nvm\" \n\
[ -s \"$NVM_DIR/nvm.sh\" ] && \. \"$NVM_DIR/nvm.sh\"  # This loads nvm \n\
[ -s \"$NVM_DIR/bash_completion\" ] && \. \"$NVM_DIR/bash_completion\"  # This loads nvm \bash_completion" > /etc/profile.d/nvm.sh
  • 设置 Clash 代理
export http_proxy=http://localhost:7890 https_proxy=http://localhost:7890 all_proxy=socks5://localhost:7890
  • yarn / pnpm 镜像
yarn config set registry http://mirrors.cloud.tencent.com/npm/
pnpm config set registry http://mirrors.cloud.tencent.com/npm/
  • 安装 ohmyzsh
apt update && apt install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  • 添加 SSH Key(用于 GitHub 仓库访问等)
ssh-keygen -t ed25519 -C "your_email@example.com"

评论