Skip to content

Instantly share code, notes, and snippets.

@tuckerconnelly
Last active May 20, 2021 12:43
Show Gist options
  • Save tuckerconnelly/ab0b9d1f30fa1390cc0448b4357285ba to your computer and use it in GitHub Desktop.
Save tuckerconnelly/ab0b9d1f30fa1390cc0448b4357285ba to your computer and use it in GitHub Desktop.
macOS New Setup Script
# I like to start fresh with a new mac, instead of using the Migration Assistant, because of all the cruft
# and useless software that may have accumulated.
#
# This script sets ups macs the way I like as a mostly JavaScript and Python developer. Feel free to copy
# and edit it as you see fit.
#
# Depends on a .env.sh file that sets up aliases here:
# https://gist.github.com/tuckerconnelly/2e69cbd3c6432c815e733f45c5827ad7
# Install xcode
xcode-select --install
# Install Brew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Brew automatically updated by install script, and brew cask installed
# Install command-line tools
brew install tree fzf ack node python postgres
# Make zsh default shell
chsh -s $(which zsh)
# Install prezto
zsh
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 -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done
echo "
zstyle ':prezto:load' pmodule \\
'git' \\
'syntax-highlighting' \\
'history-substring-search' \\
'prompt' \\
'docker'" >> ~/.zpreztorc
# Add .env.sh
curl https://gist.githubusercontent.com/tuckerconnelly/2e69cbd3c6432c815e733f45c5827ad7/raw/34eb136a7b6cda51a5bfc32ea09c1c70f91ffd8d/.env.sh > ~/.env.sh
echo "\n\nsource ~/.env.sh" >> ~/.zshrc
# Install apps
brew cask install google-chrome atom postico sourcetree slack dropbox boom-3d google-cloud-sdk spotify
# Set up gcloud
echo "\n\nsource '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc'" >> ~/.zshrc
echo "source '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc'" >> ~/.zshrc
gcloud components -q install kubectl
# Set up atom
apm install atom-css-comb atom-ide-ui busy-signal color-picker docblockr intentions linter-eslint pigments prettier-atom react linter linter-ui-default
# Add styles for Dank Mono
curl https://gist.githubusercontent.com/tuckerconnelly/255a1c5658cb45e67bc7f9ecaf4a6084/raw/3cb35d554a0cddc9d79102e0c31ed2fb251a5755/append-to-atoms-styles.less > ~/.atom/styles.less
# What’s left
{ echo "You still need to:
- Adjust system preferences: https://sourabhbajaj.com/mac-setup/SystemPreferences/
- Install Docker for Mac manually: https://store.docker.com/editions/community/docker-ce-desktop-mac
- Generate an ssh key and add it to Github: https://help.github.com/articles/connecting-to-github-with-ssh/
- Set up Chrome
- Set up Sourcetree (with ~/src folder)
- Set up Dropbox (limit synced folders)
- Activate Postico (you need to search email and download the license file)
- Install Dank Mono font: https://dank.sh/ (just click sign in to get emailed a link)
- Use Dank Mono in terminal
- Run 'gcloud init'
- Set up Boom 3D
- Set up workspaces
- Install divvy from App Store (brew cask install will be unlicensed)
"; } 2> /dev/null
# Inspired by Sourabh Bajaj's macOS Setup Guide: http://sourabhbajaj.com/mac-setup/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment