sh ./init.sh
-
-
Save nvinhphuc/55d8e8681a853f4d88af58cbca470588 to your computer and use it in GitHub Desktop.
New Mac Setup Script 2021
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
# Taps | |
tap 'homebrew/cask-fonts' | |
tap 'homebrew/cask-versions' | |
tap 'heroku/brew' | |
# Install CLI Tools | |
## Shell Utilities | |
brew 'coreutils' | |
brew 'findutils' | |
brew 'autojump' | |
brew 'zsh' | |
brew 'zsh-completions' | |
brew 'tmux' | |
brew 'jq' | |
brew 'q' | |
brew 'docker-compose' | |
brew 'ack' | |
## Network Utilities | |
brew 'htop' | |
brew 'nmap' | |
brew 'mtr' | |
brew 'wget' | |
## System Utilities | |
brew 'terminal-notifier' | |
brew 'tree' | |
brew 'mackup' | |
brew 'mas' | |
brew 'trash' | |
## Dev Utilities | |
brew 'diff-so-fancy' | |
brew 'heroku' | |
brew 'reattach-to-user-namespace' | |
brew 'git' | |
brew 'awscli' | |
brew 'w3m' | |
brew 'nvm' | |
brew 'node' | |
# Mac Apps | |
## Communication | |
cask 'slack' | |
cask 'skype' | |
## Productivity | |
cask 'alfred' | |
cask 'go2shell' | |
cask 'docker' | |
cask 'google-chrome' | |
cask 'rectangle' | |
cask 'keycastr' | |
cask 'clipy' | |
cask 'cheatsheet' | |
## System | |
cask 'skitch' | |
cask 'the-unarchiver' | |
cask 'coconutbattery' | |
cask 'appcleaner' | |
cask 'namechanger' | |
## Editor | |
cask 'visual-studio-code' | |
cask 'macdown' | |
brew 'vim' | |
## Development | |
cask 'atext' | |
cask 'diffmerge' | |
cask 'fastlane' | |
cask 'firefox' | |
cask 'gas-mask' | |
cask 'gpg-suite' | |
cask 'imageoptim' | |
cask 'iterm2' | |
cask 'java8' | |
cask 'ngrok' | |
cask 'postman' | |
cask 'robo-3t' | |
cask 'sequel-pro' | |
cask 'psequel' | |
cask 'sourcetree' | |
cask 'kubectl' | |
cask 'direnv' | |
cask 'unixodbc' | |
# Fonts | |
cask 'font-source-code-pro-for-powerline' | |
cask 'font-source-code-pro' | |
cask 'font-source-sans-pro' | |
# App | |
mas 'XCode', id: 497799835 |
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/sh | |
echo "Installing Homebrew" | |
if test ! $(which brew); then | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
fi | |
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> ~/.zprofile | |
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile | |
eval "$(/opt/homebrew/bin/brew shellenv)" | |
brew update | |
echo "Install Homebrew Packages" | |
brew tap homebrew/bundle | |
brew bundle | |
echo "Install XCode CLI Tool" | |
xcode-select --install | |
echo "Installing Oh My Zsh" | |
sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)" | |
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | |
git clone https://github.com/unixorn/fzf-zsh-plugin.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-zsh-plugin | |
sed -io 's/^plugins=.*/plugins=(autojump git brew common-aliases zsh-autosuggestions encode64 node macos sublime tmux xcode pod docker git-extras git-prompt kubectl fzf-zsh-plugin)/' ~/.zshrc | |
echo "Installing Tmux Settings" | |
git clone https://github.com/gpakosz/.tmux.git ~/.tmux | |
ln -s ~/.tmux/.tmux.conf ~/.tmux.conf | |
cp ~/.tmux/.tmux.conf.local ~/ | |
echo "Install VIM settings" | |
git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime | |
echo "Install pyenv" | |
git clone https://github.com/pyenv/pyenv.git ~/.pyenv | |
cd ~/.pyenv && src/configure && make -C src | |
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc | |
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc | |
echo 'eval "$(pyenv init -)"' >> ~/.zshrc | |
cd ~ | |
echo "Install poetry" | |
curl -sSL https://install.python-poetry.org | python3 - | |
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc | |
echo "Configrating Git" | |
# git config --global merge.tool diffmerge | |
# git config --global merge.conflictstyle diff3 | |
# git config --global mergetool.prompt false | |
# git config --global alias.co checkout | |
# git config --global alias.ci commit | |
# git config --global alias.st status | |
# git config --global alias.br branch | |
# git config --global core.editor $(which vim) | |
# git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --" | |
# git config --global alias.tree "log --graph --full-history --all --color --date=short --pretty=format:'%Cred%x09%h %Creset%ad%Cblue%d %Creset %s %C(bold)(%an)%Creset'" | |
echo "Enabling Services" | |
# open /Applications/Alfred\ 4.app | |
# open /Applications/Gas\ Mask.app | |
# open /Applications/Clipy.app | |
# open /Applications/Rectangle.app |
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/sh | |
git pull | |
echo "Updating Homebrew" | |
brew update && brew upgrade && brew cleanup && brew cask cleanup; brew bundle; brew doctor | |
echo "Updating Oh My Zsh" | |
env ZSH=$ZSH sh $ZSH/tools/upgrade.sh | |
echo "Updating VIM" | |
cd ~/.vim_runtime | |
git pull --rebase | |
echo "Updating Tmux" | |
cd ~/.tmux | |
git pull --rebase |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment