替換brew.git:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
# 替換homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
# 應用生效
brew update
# 替換homebrew-bottles:
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
npm 改淘寶源,//將registry設置為淘寶鏡像
npm config set registry http://registry.npm.taobao.org
查看registry
npm config get registry
mac
在終端進入目錄:cd ~/
mac用戶家目錄如果沒有 .pip 文件夾,那么就要新建這個文件夾
mkdir .pip
然后在.pip 文件夾內新建一個文件
vi pip.conf
編輯 pip.conf 文件,寫入阿里雲
cd ~/
mkdir .pip
vi pip.conf
###################################
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
或者可以使用豆瓣的鏡像:
[global]
index-url = http://pypi.douban.com/simple
[install]
trusted-host=pypi.douban.com