国内配置开发环境的时候经常会要用到的这几个源, thanks to G*F*W ,我们自行get找国内镜像的能力:

Python PyPI (pip)

$ nano ~/.pip/pip.conf

添加

[global]
index-url = http://pypi.douban.com/simple

Node NPM

$ nano ~/.npmrc

添加

registry = http://registry.cnpmjs.org

CNPM的源

RVM and Ruby gem

RVM
$ sed -i .bak 's!cache.ruby-lang.org/pub/ruby!ruby.taobao.org/mirrors/ruby!' $rvm_path/config/db
Ruby Gem
$ gem sources --remove https://rubygems.org/
$ gem sources -a http://ruby.taobao.org/

淘宝源

Homebrew

Homebrew Bottles

使用中科大的源

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