Last active
November 14, 2023 05:50
-
-
Save rohithegde/cf6a883a34c3e9803637d728e89e3451 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/zsh | |
| # Manual steps : | |
| # Install Chrome : https://www.google.com/chrome/ | |
| # Customise System preferences (can use AppleScript to automate this too to some extent) | |
| # - Keyboard for cursor speed and Touch Bar | |
| # 1. Homebrew | |
| sudo chown -R $(whoami) $(brew --prefix)/* | |
| sudo chown -R $(whoami) /usr/local/share/zsh /usr/local/share/zsh/site-functions | |
| chmod u+w /usr/local/share/zsh /usr/local/share/zsh/site-functions | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
| # 1a. Homebrew - Basics : | |
| brew install wget | |
| brew install htop | |
| brew install tmux jq ncdu task | |
| # 1b. Curl with openssl | |
| brew uninstall curl | |
| brew install curl-openssl | |
| # 1c. Python3 | |
| brew install pyenv | |
| brew install zlib | |
| CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" pyenv install --patch 3.8.2 < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1) | |
| pyenv global 3.8.2 | |
| # 2. Zsh | |
| chsh -s /bin/zsh | |
| # 2a. Prezto framework | |
| rm -rf "${ZDOTDIR:-$HOME}/.zprezto" | |
| git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto" | |
| setopt EXTENDED_GLOB | |
| for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do | |
| ln -sf "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}" | |
| done | |
| # 2b. Zsh theme | |
| # Install Fonts | |
| echo 'eval "$(pyenv init --path)"' >> ~/.zshrc | |
| wget -P ~/Library/Fonts https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf | |
| wget -P ~/Library/Fonts https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf | |
| wget -P ~/Library/Fonts https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf | |
| wget -P ~/Library/Fonts https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf | |
| echo 'ZSH_THEME="powerlevel10k/powerlevel10k"' >> ~/.zshrc | |
| setopt EXTENDED_GLOB | |
| for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do | |
| ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}" | |
| done | |
| echo "zstyle ':prezto:module:prompt' theme 'powerlevel10k'" >> ~/.zpreztorc | |
| # 3. Vim | |
| # 3a. Package manager : vim-plug | |
| wget -P ~/.vim/autoload/ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
| # 3b. Vim Plugins | |
| mkdir -p ~/.vim/bundle | |
| echo "call plug#begin('~/.vim/bundle')" >> ~/.vimrc | |
| echo "Plug 'vim-airline/vim-airline'" >> ~/.vimrc | |
| echo "Plug 'vim-airline/vim-airline-themes'" >> ~/.vimrc | |
| echo "Plug 'preservim/nerdtree'" >> ~/.vimrc | |
| echo "call plug#end()" >> ~/.vimrc | |
| vim -E -s -u "$HOME/.vimrc" +PlugInstall +qall | |
| # 4. Visual Studio code | |
| brew install --cask visual-studio-code | |
| # get ext list with code --list-extensions >> vs_code_extensions_list.txt and upload it to github | |
| wget https://gist.github.com/rohithegde/cb440b87f890145663016963e91774ae/raw/73de0705f1e35e3329347db88dab2569a450b428/vs-code-extensions-list-az-devops.txt | |
| cat vs-code-extensions-list-az-devops.txt | xargs -n 1 code --install-extension | |
| # 5. Azure | |
| brew update && brew install azure-cli | |
| brew install --cask powershell | |
| # 6. Kubernetes and Istio | |
| az aks install-cli | |
| brew install derailed/k9s/k9s | |
| sudo pip3 install kube-shell | |
| brew install istioctl | |
| # 6. Docker | |
| brew install --cask docker | |
| # 7. Terraform | |
| brew install terraform | |
| brew install terraform-docs | |
| # 8. Git | |
| brew install git | |
| # 9. Golang | |
| mkdir -p $HOME/code/research/golang | |
| echo "export GOPATH=$HOME/code/research/golang" >> ~/.zshrc | |
| echo "export GOROOT=/usr/local/opt/go/libexec" >> ~/.zshrc | |
| echo "export PATH=$PATH:$GOPATH/bin" >> ~/.zshrc | |
| echo "export PATH=$PATH:$GOROOT/bin" >> ~/.zshrc | |
| brew install go | |
| brew install dep | |
| #10 Blog | |
| sudo gem install jekyll bundler | |
| # 11. Miscellaneous | |
| # TF support for Zsh | |
| echo "zstyle ':prezto:load' pmodule-dirs $HOME/.zprezto-contrib" >> ~/.zpreztorc | |
| git clone https://github.com/prezto-contributions/prezto-terraform.git ~/.zprezto-contrib/terraform | |
| # MANUAL : add git, terraform to pmodule list | |
| wget -P ~/ https://gist.github.com/rohithegde/7481ba88172233caa278969b4bb6605a/raw/aliases.txt | |
| echo "source ~/aliases.txt" >> ~/.zshrc | |
| brew install --cask netnewswire | |
| # Draw.io ie diagrams.net desktop app | |
| wget https://github.com/jgraph/drawio-desktop/releases/download/v14.6.13/draw.io-14.6.13.dmg | |
| echo "Please install the softwares present in the Downloads folder." | |
| #NOTE : Your setup is present in files | |
| #1. ~/.zshrc | |
| #2. ~/.zpreztorc | |
| #3. ~/aliases.txt | |
| # 4. ~/.p10k.sh - will be created automatically once you start zsh for the first time and run through the p10k options. | |
| # 12. Xcode from App Store | |
| # Alternative is to install using Mac store CLI : | |
| # brew install mas | |
| # mas list | |
| # mas search Xcode | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment