Skip to content

Instantly share code, notes, and snippets.

@bllli
Last active February 26, 2022 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bllli/b99490d83a4a43c2f28e48d1549fed02 to your computer and use it in GitHub Desktop.
Save bllli/b99490d83a4a43c2f28e48d1549fed02 to your computer and use it in GitHub Desktop.
fuck gfw
asdf plugin-add python https://gitee.com/bllli/asdf-python.git
# pyenv 使用gitee加速
sed -i 's/https:\/\/github.com\/pyenv\/pyenv.git/https:\/\/gitee.com\/bllli\/pyenv.git/g' `grep 'https://github.com/pyenv/pyenv.git' -rl .asdf --include "*"`
sed -i 's/git:\/\/github.com\/pyenv\/pyenv.git/git@gitee.com:bllli\/pyenv.git/g' `grep 'git://github.com/pyenv/pyenv.git' -rl .asdf --include "*"`
# Python包使用华为云加速
# https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tar.xz
# https://www.python.org/ftp/ -> https://mirrors.huaweicloud.com/
sed -i 's/https:\/\/www.python.org\/ftp/https:\/\/mirrors.huaweicloud.com/g' `grep 'https://www.python.org/ftp' -rl .asdf --include "*"`
asdf install python 3.8.12
asdf global python 3.8.12
wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh
# Default settings
ZSH=${ZSH:-~/.oh-my-zsh}
REPO=${REPO:-ohmyzsh/ohmyzsh}
REMOTE=${REMOTE:-https://github.com/${REPO}.git}
BRANCH=${BRANCH:-master}
## FROM
REPO=${REPO:-ohmyzsh/ohmyzsh}
REMOTE=${REMOTE:-https://github.com/${REPO}.git}
## TO
REPO=${REPO:-mirrors/oh-my-zsh}
REMOTE=${REMOTE:-https://gitee.com/${REPO}.git}
cd ~/.oh-my-zsh
git remote set-url origin https://gitee.com/mirrors/oh-my-zsh.git
git pull
git clone https://gitee.com/bllli/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://gitee.com/bllli/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment