skip to content
Notes && Anecdotes
Laptop on a desk. Photo by Nick Morrison on Unsplash.

Setting up a new developer Macbook

brewmactools

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

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 from Dropbox/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.

Hide that Dock

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

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