Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kjbrum
Last active July 9, 2019 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kjbrum/2c44d39325fad624c4773a09dd8c6a5c to your computer and use it in GitHub Desktop.
Save kjbrum/2c44d39325fad624c4773a09dd8c6a5c to your computer and use it in GitHub Desktop.
Quick steps for getting your local dev environment up and running.

Dev Environment Setup

Be sure to follow these steps in order, or you might run into unexpected issues.

Xcode

# When asked about the command line tools, hit install.
xcode-select --install

Homebrew

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

SSH Key

Make sure you have an SSH key setup and added to your Github account.

To check if you have a key:

cat ~/.ssh/id_rsa.pub

If nothing is printed to the console, that means you don't have a key. Generate a key with the following:

# Just hit enter for all the prompts
ssh-keygen -t rsa -C "<email@example.com>"

Copy your SSH key to your clipboard:

pbcopy < ~/.ssh/id_rsa.pub

Navigate to https://github.com/settings/keys and add your new SSH key.

.bash_profile

Add the following to your local .bash_profile:

# Update the PATH variable
export PATH="$(composer config -g home)/vendor/bin:$PATH"
export PATH="/usr/local/bin:$PATH"
export PATH="/usr/local/sbin:$PATH"

# Go
export GOPATH="$HOME/go"
export GOROOT="$(brew --prefix golang)/libexec"
export PATH="$GOPATH/bin:$GOROOT/bin:$PATH"

# Set our Homebrew Cask application directory
export HOMEBREW_CASK_OPTS="--appdir=/Applications"

# Add SSH keys to the ssh-agent
# https://developer.github.com/v3/guides/using-ssh-agent-forwarding/
# https://confluence.atlassian.com/bitbucket/configure-multiple-ssh-identities-for-gitbash-mac-osx-linux-271943168.html
if [ ! $(ssh-add -l | grep -o -e id_rsa) ]; then
    ssh-add "$HOME/.ssh/id_rsa" > /dev/null 2>&1
fi

Be sure to open a new terminal window after making this update.

Git

brew install git

Node/npm

# Install n (https://github.com/tj/n)
brew install n

# Install Node/npm
n lts

# You might get an error about sudo, if so, run the following
sudo n lts

Composer Global Require (CGR)

Once this is installed, anytime you need to install something using composer global require, replace it with cgr.

Example: composer global require weprovide/valet-plus becomes cgr weprovide/valet-plus.

composer global require consolidation/cgr

Valet+

Follow these instructions: https://github.com/weprovide/valet-plus#installation

Link MySQL

brew link mysql@5.7 --force

Envoy

cgr laravel/envoy

Go & Serfix

# Install Go
brew install go

# Install Serfix
go get github.com/astockwell/serfix

Tools/Apps

  • VS Code: brew cask install visual-studio-code
  • Sequel Pro: brew cask install sequel-pro
  • iTerm2: brew cask install iterm2

TODO

  • Add steps for WordPress deployer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment