Skip to content

Instantly share code, notes, and snippets.

@tangzhen
Created June 29, 2014 10:16
Show Gist options
  • Save tangzhen/1419c3eee991664bc02d to your computer and use it in GitHub Desktop.
Save tangzhen/1419c3eee991664bc02d to your computer and use it in GitHub Desktop.
Switch NodeJS and Ruby Gem to China Taobao mirror
# switch npm
echo '\n#alias for cnpm\nalias cnpm="npm --registry=registry.npm.taobao.org \
--cache=$HOME/.npm/.cache/cnpm \
--disturl=http://npm.taobao.org/dist \
--userconfig=$HOME/.cnpmrc"' >> ~/.zshrc && source ~/.zshrc
#switch Ruby gem
gem sources --remove https://rubygems.org/
gem sources -a https://ruby.taobao.org/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment