Skip to content

Instantly share code, notes, and snippets.

@kjbrum
Last active July 9, 2019 21:56
Show Gist options
  • Select an option

  • Save kjbrum/2c44d39325fad624c4773a09dd8c6a5c to your computer and use it in GitHub Desktop.

Select an option

Save kjbrum/2c44d39325fad624c4773a09dd8c6a5c to your computer and use it in GitHub Desktop.
Quick steps for getting your local dev environment up and running.
# 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

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 protected]>"

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 contents of the .bash_profile file to your local .bash_profile:

curl https://gist.github.com/kjbrum/2c44d39325fad624c4773a09dd8c6a5c/raw/.bash_profile >> ~/.bash_profile

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 [email protected] --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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment