npm:
npm config set registry https://registry.npm.taobao.org
ref: https://segmentfault.com/a/1190000002576600
composer:
composer config -g repo.packagist composer https://packagist.phpcomposer.com
ref: https://pkg.phpcomposer.com/
ubuntu 16.04 apt:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bk
sudo vi /etc/apt/sources.list
:1,$d
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
:wq
ref: delete all lines = ":1,%d" https://unix.stackexchange.com/questions/161821/how-can-i-delete-all-lines-in-a-file-using-vi
ref: http://www.cnblogs.com/iamhenanese/p/5514111.html
ubuntu 18.04
#阿里云源 deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
ref: http://www.cnblogs.com/it-tsz/p/9742311.html
homebrew: 清华的那个不好用了
https://lug.ustc.edu.cn/wiki/mirrors/help/brew.git
docker: 阿里云的镜像,需要阿里云用户。
https://cr.console.aliyun.com/#/accelerator
docker镜像内的debian,如果需要apt install的话,最好也用国内镜像,不然慢死
#Make a backup copy of your current sources.list file
RUN cp /etc/apt/sources.list /etc/apt/sources.list.bak
# chinese mirror
RUN echo "deb http://mirrors.ustc.edu.cn/debian/ jessie main non-free contrib" | tee -a /etc/apt/sources.list
RUN echo "deb-src http://mirrors.ustc.edu.cn/debian/ jessie main non-free contrib" | tee -a /etc/apt/sources.list
RUN echo "deb http://mirrors.ustc.edu.cn/debian/ jessie-proposed-updates main non-free contrib" | tee -a /etc/apt/sources.list
RUN echo "deb-src http://mirrors.ustc.edu.cn/debian/ jessie-proposed-updates main non-free contrib" | tee -a /etc/apt/sources.list
TBC