Setting up a new developer Macbook
Every ~4 years, I’m getting a new Mac. It has happened a few times now, so I thought I might as well make a setup guide for next time. Also, it’s interesting to see how many (or few!) things change.
Install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Install formulas
brew tap heroku/brew
brew install \
heroku \
n \
pyenv \
redis \
postgresql \
z \
zsh \
oh-my-zsh \
git \
diff-so-fancy \
yarn \
ffmpeg \
hashicorp/tap/terraform
n postsetup
You want to use n without sudo, see n on github:
sudo mkdir -p /usr/local/n
sudo chown -R $(whoami) /usr/local/n
sudo mkdir -p /usr/local/bin /usr/local/lib /usr/local/include /usr/local/share
sudo chown -R $(whoami) /usr/local/bin /usr/local/lib /usr/local/include /usr/local/share
oh-my-zsh
Make zsh nicer.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Install Homebrew casks
brew install --cask \
dropbox \
iterm2 \
google-chrome \
firefox \
keybase \
1password \
slack \
webstorm \
pycharm \
visual-studio-code \
spotify \
alfred \
figma \
postman \
rectangle \
sublime-text \
ngrok
Log in to dropbox
Link settings files
This is how I keep settings synced across machines
cd
ln -s Dropbox/settings/.git_profile
ln -s Dropbox/settings/.bash_profile
ln -s Dropbox/settings/.gitignore_global
ln -s Dropbox/settings/.gitconfig
ln -s Dropbox/settings/.zshrc
Local adaptations
touch .local_profile .zshrc.local
Iterm
- Install the delicious Dejavu Sans Mono For Powerline
- Add settings by going to
General -> Load preferences from a custom folder or url
and loading the iterm folder fromDropbox/settings/iterm
Webstorm/Jetbrains
- Get IDE settings/plugins synced from my account
(Subjective) preferences
- Make Alfred search for folders and Chrome bookmarks – Alfred -> Settings -> Features -> Web bookmarks
- Make Caps lock button act as CTRL instead – Alfred-search “Keyboard” -> Modifier Keys
- Swap windows within application with
cmd-ctrl-tab
– Alfred-search “Keyboard” -> Shortcuts -> Keyboard -> Move focus to next window - Remove the bad shortcuts –> Alfred-search “Keyboard” -> Shortcuts -> Generally remove every you don’t know or use.
- Set finder to always open in list view – Open finder, click your harddisk, click cmd-J and configure.
defaults write com.apple.dock autohide -bool true
defaults write com.apple.dock autohide-delay -float 1000
defaults write com.apple.dock no-bouncing -bool TRUE && killall Dock
Update 2022
- Spectacle replaced with Rectangle, due to no longer in active development
- Keybase removed. Zoom acquired them, and Mac Silicon seems to be a problem.
- Removed oh-my-zsh. No longer being served through brew.
- Removed node – no need when installing n.
- Added terraform
Temporary Mac Silicon issues
# npm fails at installing npm module sharp (and probably others)
# https://sharp.pixelplumbing.com/install#apple-m1
brew install --build-from-source gcc
Previous postWhere is my PostgreSQL logs?
Next PostA good standup has 3 points