运维开发网
广告位招商联系QQ:123077622
 
广告位招商联系QQ:123077622

个人常用镜像

运维开发网 https://www.qedev.com 2020-08-13 11:30 出处:网络 作者:运维开发网整理
Homebrew Homebrew 源代码仓库 (brew upate) 替换USTC镜像: cd "$(brew --repo)" git remote set-url origin https://mirrors.ustc.edu.cn/brew.git 重置为官方地址: cd "$(brew --repo)" git remote set-url origin https://github.

Homebrew

Homebrew 源代码仓库 (brew upate)

替换USTC镜像:

cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git

重置为官方地址:

cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git

Homebrew 预编译二进制软件包

对于 zsh 用户:

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc

对于 bash 用户:

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile

npm

cnpm

npm install -g cnpm --registry=https://registry.npm.taobao.org

alias

alias cnpm="npm --registry=https://registry.npm.taobao.org --cache=$HOME/.npm/.cache/cnpm --disturl=https://npm.taobao.org/dist --userconfig=$HOME/.cnpmrc"

# Or alias it in .bashrc or .zshrc
$ echo '\n#alias for cnpm\nalias cnpm="npm --registry=https://registry.npm.taobao.org   --cache=$HOME/.npm/.cache/cnpm   --disturl=https://npm.taobao.org/dist   --userconfig=$HOME/.cnpmrc"' >> ~/.zshrc && source ~/.zshrc

Ruby

RVM

echo "ruby_url=https://cache.ruby-china.com/pub/ruby" > ~/.rvm/user/db

RubyGems

gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
gem sources -l
https://gems.ruby-china.com
# 确保只有 gems.ruby-china.com

使用 Gemfile 和 Bundler

bundle config mirror.https://rubygems.org https://gems.ruby-china.com

这样你不用改你的 Gemfile 的 source。

扫码领视频副本.gif

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号