Reinstalling macOS

doc apple

An opinionated way of setting up a Mac for web development. I keep this updated for my own benefit, feel free to use it.

Erase and Reinstall

Follow Apple’s official insctructions on reformatting your Mac.

Homebrew

Install the missing package manager.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update

rbenv

Use rbenv to manage the version of Ruby your system will use.

brew install rbenv
rbenv init
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile

Now restart terminal.

Choose a Ruby version to install:

rbenv install -l
rbenv install 2.3.1
echo 2.3.1 >> ~/.ruby-version

Node

brew install node

ZSH

brew install zsh zsh-completions

Oh-My-ZSH

curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh

Change default shell to ZSH

echo /usr/local/bin/zsh >> /etc/shells
sudo nano /etc/shells
chsh -s /usr/local/bin/zsh

.zshrc Tweak - ls with colour

alias ls="ls -fG"

Custom Oh-My-ZSH theme

touch ~/.oh-my-zsh/themes/wstone.zsh-theme
open -a TextEdit ~/.oh-my-zsh/themes/wstone.zsh-theme

Copy the following:

local ret_status="%(?:%{$fg_bold[green]%}$ :%{$fg_bold[red]%}$ )"

PROMPT='
%{$fg[cyan]%}${PWD/#$HOME/~}%{$reset_color%} $(git_prompt_info)
${ret_status}%{$reset_color%}'

ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"

Save and close TextEdit.

open -a TextEdit ~/.zshrc

Change the ZSH_THEME constant to ZSH_THEME="wstone". Save, close, restart Terminal.

Git

brew install git

Restart Terminal

nano ~/.gitconfig

If ~/.gitconfig doesn’t exist, touch it. Add/merge the following.

[user]
    name = Will Stone
    email = will@wstone.io
[push]
    default = simple
[alias]
    a = add
    cm = commit -m
    s = status
    p = push

Trash CLI

Easily move items to the trash from the command line, using trash .... Website: github.com/ali-rantakari/trash

brew install trash

App Store Apps

  • Affinity Designer
  • DaisyDisk
  • Divvy
  • Pixelmator
  • Tweetbot
  • Wunderlist

Brew Cask Apps

brew cask install …
  • dropbox
  • visual-studio-code (install sync-settings extension)
  • google-chrome
  • istat-menus (Preferences are stored in Dropbox)
  • qlmarkdown (Quick Look Markdown; use the spacebar in finder to quickly open markdown files)
  • spotify
  • statusfy
  • telegram

If you would like to comment on this post, feel free to tweet me @will_stone_