Here a quick guide on setting up your macbook.

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 \
chromedriver \
imagemagick \
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 https://code.facebook.com/posts/1840075619545360.

npm install -g [email protected]
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 \
google-chrome

Make a Heroku account

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

http://www.heroku.com

Install GPG

You need to be able to encrypt and decrypt sensitive data, you need GPP 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

brew tap caskroom/versions
brew cask install sublime-text

You can use any text editor you want, but please start with this one first. After this you might want to install the following sublime extensions:

  • Install sublime package control
  • Slim support via package control via ‘Ruby Slim’
  • Remove whitespace via pckage 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

Set 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 webserver, we can also use puma-dev but that’s still a bit flaky.

http://pow.cx

Clone our github repos

https://github.com/leaplines

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