Here a quick guide on setting up your mac book.

Mac installation

When installing your mac you get a bunch of questions, follow these:

  • Enable Filevault hardware encryption
  • Enable Find my Device
  • Make a new Apple Id or use an existing ID

Install some base packages with brew

Setting up a laptop for development, we use brew and brew cask. First go and install homebrew.

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

Then its time to install some packages, such as SQL, ruby version management etc, git and Heroku. We do this with homebrew

brew install \
git \
postgresql \
rbenv \
git-extras \
rbenv-vars \
ruby-build \
the_silver_searcher \
heroku \
wget \
node

Install the JS package managers

Install via NPM, we’ll use Yarn exclusively though after we install NPM. Here’s why we use YARN arn: A new package manager for JavaScript.

npm install -g npm@latest
npm install -g yarn

Install some apps with brew cask

Brew cask is the preferred way to install apps. Check out what it is here https://caskroom.github.io.

brew install caskroom/cask/brew-cask
brew cask install \
skype \
sourcetree \
freemind \
pgweb \
graphiql \
slack

Register and setup accounts

Setup a Github account

Setup a Github account. That is where we store our code.

Github

Make a Heroku account

You need to deploy our code to production, so you need to make a Heroku account. Heroku is our preferred platform for deployment.

Heroku

Setup a google account if you haven’t yet

Since we use Google docs for spreadsheets and documents. Signup for a google account.

Google Accounts

Setup your Trello account

Go to Trello and setup your account, we use this for our task management.

Install GPG

You need to be able to encrypt and decrypt sensitive data, you need GOP for that. All our backups and customer data is encrypted.

brew install gnupg gnupg2

And create a key, keep your private key private.

https://help.github.com/articles/generating-a-new-gpg-key/

Install Sublime Text

You can use any text editor you want, but please start with this one first.

brew tap caskroom/versions
brew cask install sublime-text

After this you might want to install the following sublime extensions:

  • Install sublime package control
  • Slim support via package control via ‘Ruby Slim’
  • Remove white space via package control ‘Trailing Spaces’

Edit the sublime text file using CMD+, (command key+comma)

  • Set spaces to 2 in Sublime, and use spaces as tabs.
{
  "tab_size": 2,
  "translate_tabs_to_spaces": true,
  "font_size": 11,
  "ignored_packages": ["Vintage"]
}

Setup your Git

Setup some defaults for GIT:

git config --global core.editor "vim"
git config --global push.default current

Set up your identity for github (replace these things with your name, and email as necessary):

git config --global user.name "John Doe"
git config --global user.email [email protected]

Setup your bash_profile

Edit the ~/.bash_profile file and replace it with this:

export EDITOR=subl
eval "$(rbenv init -)"

source $(brew --prefix)/etc/bash_completion.d/git-prompt.sh
source $(brew --prefix)/etc/bash_completion.d/git-completion.bash

PS1="\W\$(__git_ps1 \" (%s)\") ∆ "

Install pow

Pow is our development web server, we can also use puma-dev but that’s still a bit flaky.

Pow

Cloning example repositories

git clone [email protected]:assemblymade/meta.git
git clone [email protected]:catarse/catarse.git
git clone [email protected]:assemblymade/coderwall.git
git clone [email protected]:sharetribe/sharetribe.git
git clone [email protected]:discourse/discourse.git
git clone [email protected]:instructure/canvas-lms.git
git clone [email protected]:asm-helpful/helpful-web.git
git clone [email protected]:asm-products/gamamia.git
git clone [email protected]:railsbridge/bridge_troll.git
git clone [email protected]:lockitron/selfstarter.git

Things to read up