Skip to content

Instantly share code, notes, and snippets.

@jasonlucas907
Last active April 13, 2018 19:00
Show Gist options
  • Save jasonlucas907/f44872ba316af83725c988ab78bf1de6 to your computer and use it in GitHub Desktop.
Save jasonlucas907/f44872ba316af83725c988ab78bf1de6 to your computer and use it in GitHub Desktop.

Developer Laptop Setup, for Mac

Make Yourself At Home

Secure It!

  • Install LastPass
  • Install Sophos VPN
  • Install Sophos Endpoint Protection, using link sent by IT admin

Install Homebrew

Homebrew is a package management system that makes it easy to install hundreds of open source projects and compile them from source for maximum performance on your machine.

Open the Terminal then run the homebrew installation script:

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

It will ask you for your password. This is the password to log in to your account on the computer. It needs this because it installs its packages in a place that all users of this computer can access.

Verifying Homebrew

When it has completed the installation run brew doctor and it should tell you that everything is fine:

brew doctor
Your system is ready to brew.

Modifying your PATH

If you got a warning from Homebrew about your path, do the following:

echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile

Now run brew doctor again and the warning should be gone.

Aside: PATH

Your PATH is a system configuration property which tells your computer which places to look for underlying programs when you want to run a command.

For example, when we type ruby at the command line to run a ruby program, our PATH will help the system know where on the system to find ruby. By adding this directory to our PATH, we’re telling the system how to find the various applications we will install using Homebrew

Aside: ~/.bash_profile

When we use our terminal, we’re actually using a program called a “Shell” to interact with the underlying Operating System. Specifically, we’re using a shell called Bash.

The file ~/.bash_profile contains settings and commands to help us configure the shell, so when we have a bit of configuration code such as setting our PATH, it often goes in our ~/.bash_profile.

Install Node.js

We’re going to use Node Version Manager (nvm) to install Node.js.

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash

Install the latest version.

nvm install node

Restart the terminal and run the final command.

nvm use node

Confirm that you are using the latest version of Node.

node -v

And for later, here's how to update:

nvm install node --reinstall-packages-from=node

Install npm

Simple API for globally installing or uninstalling one or more NPM packages.

When you install node.js, npm is automatically installed. However, npm gets updated more frequently than Node.js, so be sure that you have the latest version.

To test, run

npm -v.

To be sure that this matches the latest version, scroll to the bottom of this page. If the version you see does not match the latest version, run:

npm install npm@latest -g.

This will install the latest official, tested version of npm.

To install a version that will be released in the future, run:

npm install npm@next -g.

Install Grunt

Grunt is a task-based command line build tool for JavaScript projects.

run

npm install -g grunt

Install Ruby

You can run rvm list to see a full list of versions available. To use the latest version, find the number and run this command.

rvm --default use 2.4.0

Confirm that you are running the latest version.

rvm -v

Install bundler for Ruby

Gem is the Ruby package manager that we’re going to use to install bundler…a package manager. This is necessary to use Jekyll and useful for any other Ruby project.

gem install bundler

Get your Git On

Install git

brew install git
==> Downloading http://git-core.googlecode.com/files/git-1.8.3.4.tar.gz
########################################################### 100.0%

Configure Git

git config --global push.default simple
git config --global user.name "Awesome Developer"
git config --global user.email "adeveloper@peaksware.com"

Configure your Git SSH key

Configure SSH for Git

Build a root folder for our git repos on Mac

The following examples in these directions are based on creating a root directory for our git repos named /dev.

mkdir dev

You can name the root directory whatever you would like. You will just need to replace /dev in the following directory examples with the name you selected for your root directory.

Install Some Other Nifty Tools

Install a database system(Optional and not required to run Mars)

Install a database sytem of your choice. These are two suggestions:

Setup PostgresSQL using Homebrew(optional)

PostgreSQL is a powerful, open source object-relational database system.

Install PostgresSQL in the terminal using Homebrew.

brew install postgresql

Running Postgres

  • Start Postgres
psql -f ./database/users.sql

This will drop and recreate your database.

Using Postgres

In the terminal once you have your project built and running press Command T to open a new tab in your terminal.

Run psql in the new terminal tab. This will get you into the interactive postgres terminal. From here you can run postgres and sql commands. You might get an error psql: FATAL: database "username" does not exist To resolve this error type createdb 'somthing does not exist'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment