Setting up MacOS for development - cheatsheet
Posted 01 Jan 2019
The following provides a quick guide to setting up a new Mac - primarily for the use a development machine. I use this for myself and new employees whenever needing to set up a new machine:
Homebrew and Cask
For most dependencies install Homebrew (please refer to the original site in the event the instructions are out of date):
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
For graphical applications, install Brew Cask:
brew tap caskroom/cask
Then install all your favourites, such as:
brew cask install google-chrome
brew cask install dropbox
brew cask install spotify
brew cask install postico
# etc
NVM, Node and Yarn
Install Node version manager:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
Ensure you follow the steps at the end of the install - namely add the following to ~/.bash_profile
:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
Reopen your terminal window and install node:
nvm install 9
nvm alias default 9
Install Yarn via Brew:
brew install yarn --without-node
Ruby version manager:
Install the Ruby version manager:
\curl -sSL https://get.rvm.io | bash -s stable
Install Ruby:
rvm install ruby
gem install bundler
Setting up your GitHub SSH key:
Connecting to GitHub
ssh-keygen -t rsa -b 4096 -C "YOUR_EMAIL"
pbcopy < ~/.ssh/id_rsa.pub