Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. T
I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install.
- Make backup
- Download Sierra installer
- Format USB Stick, name it Sierra
- Copy the Sierra installer onto the stick
sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/Sierra --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction
The software selected is software that is "tried and true" --- software I need after any fresh install. I often install other software not listed here, but is handled in a case-by-case basis.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
The mas
command by argon
is a handy tool to interact with the App Store without needing to point and click, search, and otherwise need manual intervention. This lets us install the next batch of software very quickly using Terminal.
Now that Homebrew is installed, it's easy to get mas:
brew install mas
Then signin to the Mac App Store for the first time:
mas signin [email protected]
curl -o Brewfile https://gist.githubusercontent.com/gillesdemarty/dc5dd9db503702ec1a7abfe15f3a4897/raw/b176f434ae7f52b0b8e9b5f6593406837aaaa1a0/2-macOS-10.12-sierra-setup-brewfile
You may wish to add or remove a few App Store or Cask items before initiating Homebrew to install all of the applications. If you wish to review these now you may examine the Brewfile now.
brew bundle install
This will take some time, especially if you have a slow internet connection and because Xcode is huge. But it's faster than you having to search the App Store app and click to install for each of these!
Install custom .dotfiles
git clone [email protected]:dmrty/.dotfiles.git ~/.dotfiles
~/.dotfiles/install.sh
Update .bash_profile
echo 'source ~/.dotfiles/base.sh' >> ~/.bash_profile
#Store screenshots in subfolder on desktop
mkdir ~/Screenshots
defaults write com.apple.screencapture location ~/Screenshots
sudo scutil --set HostName mbp-gilles
#Git
ssh-keygen -t rsa -C "[email protected]"
# Copy ssh key to github.com
subl ~/.ssh/id_rsa.pub
open https://github.com/settings/keys
# Test connection
ssh -T [email protected]
# Set git config values
git config --global user.name "Gilles Demarty"
git config --global user.email "[email protected]"
git config --global github.user dmrty
git config --global github.token your_token_here
git config --global core.editor "subl -w"
git config --global color.ui true
Edit ~/.ssh/config
Host * (asterisk for all hosts or add specific host)
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa
On my system (Mac OSX Sierra, German) applying
Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 0.02
Set a shorter Delay until key repeat
defaults write NSGlobalDomain InitialKeyRepeat -int 12
led to keys not repeating at all.