Last active
November 24, 2022 14:30
-
-
Save Shawn1224/923d5709bff8a2107f153b5bb8432faa to your computer and use it in GitHub Desktop.
macos-dev-setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
xcode-select --install | |
# get back from another machine | |
# brew bundle dump | |
# ----------------------------------------------------- basic ----------------------------------------------------- # | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
brew doctor | |
sed -i '.bak' '1s/^/export PATH="\/usr\/local\/bin:$PATH"\'$'\n/g' $HOME/.zshrc | |
sed -i '.bak' '1s/^/export PATH="\/usr\/local\/bin:$PATH"\'$'\n/g' $HOME/.bash_profile | |
source $HOME/.zshrc | |
source $HOME/.bash_profile | |
brew tap homebrew/cask-versions | |
brew install \ | |
wget \ | |
curl \ | |
git | |
brew install --cask google-chrome-canary | |
brew install --cask google-chrome | |
brew info --cask firefox | |
brew install --cask firefox | |
brew install --cask yandex | |
brew install --cask brave-browser | |
brew install --cask tor-browser | |
brew install --cask opera-gx | |
brew install --cask vivaldi | |
# ----------------------------------------------------- utils ----------------------------------------------------- # | |
brew install tree \ | |
youtube-dl \ | |
adguard-vpn | |
brew install --cask calibre | |
brew install --cask commander-one | |
brew install --cask a-better-finder-attributes | |
brew install --cask 5kplayer | |
brew install --cask 4k-stogram | |
# ----------------------------------------------------- dev ------------------------------------------------------- # | |
brew install hudochenkov/sshpass/sshpass | |
brew install --cask dbeaver-community | |
brew install --cask anaconda | |
conda create -q -y -n py27 python=2.7 | |
conda activate py27 | |
# curl "https://nodejs.org/dist/latest/node-${VERSION:-$(wget -qO- https://nodejs.org/dist/latest/ | sed -nE 's|.*>node-(.*)\.pkg</a>.*|\1|p')}.pkg" > "$HOME/Downloads/node-latest.pkg" && sudo installer -store -pkg "$HOME/Downloads/node-latest.pkg" -target "/" | |
brew install node | |
# brew install nvm | |
# nvm_setup=' | |
# export NVM_DIR=~/.nvm | |
# source $(brew --prefix nvm)/nvm.sh | |
# ' | |
# echo "$nvm_setup" >>$HOME/.bash_profile | |
brew install golang | |
go version | |
# IDE/Editor | |
brew install --cask visual-studio-code | |
cat <<EOF >>~/.bash_profile | |
# Add Visual Studio Code (code) | |
export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" | |
EOF | |
cat <<EOF >>~/.zprofile | |
# Add Visual Studio Code (code) | |
export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" | |
EOF | |
# VSCode extensions | |
# ESDoc MDN | |
# CSS Peek | |
# ----------------------------------------------------- kubectl ----------------------------------------------------- # | |
brew install --cask docker | |
# brew install kubectl | |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl.sha256" | |
echo "$(cat kubectl.sha256) kubectl" | shasum -a 256 --check | |
chmod +x ./kubectl | |
sudo mv ./kubectl /usr/local/bin/kubectl | |
sudo chown root: /usr/local/bin/kubectl | |
kubectl version --client | |
kubectl completion zsh | |
sed -i '.bak' '1s/^/source <(kubectl completion zsh)\'$'\n/g' $HOME/.zshrc | |
sed -i '.bak' '2s/^/compinit\'$'\n/g' $HOME/.zshrc | |
sed -i '.bak' '1s/^/autoload -Uz compinit\'$'\n/g' $HOME/.zshrc | |
# echo 'source <(kubectl completion bash)' >>~/.bash_profile | |
# kubectl completion bash >/usr/local/etc/bash_completion.d/kubectl | |
# https://kubernetes.io/zh/docs/tasks/tools/install-kubectl-macos/#optional-kubectl-configurations-and-plugins | |
# brew install bash | |
# echo $BASH_VERSION $SHELL | |
# brew install bash-completion@2 | |
# export BASH_COMPLETION_COMPAT_DIR="/usr/local/etc/bash_completion.d" | |
# [[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh" | |
# 重新加载 shell,并用命令 type _init_completion 验证 bash-completion v2 已经恰当的安装。 | |
# exit | |
# type _init_completion | |
# ------------------------------------------------------ softwares --------------------------------------------- # | |
# music | |
brew install --cask yesplaymusic | |
brew install --cask ieasemusic | |
brew install --cask finicky | |
brew install --cask browserosaurus | |
brew install --cask adrive | |
brew install --cask wechat qq | |
# --------------------------------------------------------- alias ------------------------------------------------ # | |
# $HOME/scripts/set_alias.sh | |
sh set_alias.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
set_alias.sh