Skip to content

Instantly share code, notes, and snippets.

@tjhanley
Last active October 17, 2021 18:38
Show Gist options
  • Save tjhanley/f8d681d8a3c659c41f80c81fd1f12b3d to your computer and use it in GitHub Desktop.
Save tjhanley/f8d681d8a3c659c41f80c81fd1f12b3d to your computer and use it in GitHub Desktop.
My Dev Setup

Engineering Home

Developer Setup

Brew

Install Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Shell optional

Shells are a very personal preference thing. I use OhMyZSH, only because the plugins are really solid. You can over do it with plugins and really slow down your shell.

To determine what shell you are running, enter this in your terminal

$> echo ${SHELL} 
/bin/zsh #zshell

My Setup

# Oh My Zsh
$> sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

# Powerlevel10k (makes things pretty)
# https://github.com/romkatv/powerlevel10k#oh-my-zsh
$> git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

# Set your zsh theme to Powerlevel10k
# Set ZSH_THEME="powerlevel10k/powerlevel10k" in ~/.zshrc.

# You may need to start a new shell or rehash to pick up the changes to your ~/.zshrc file.

# Configure Powerlevel10k
$> p10k configure # Follow the prompts to customize your prompt

Install Git

$> brew install git
$> git config --global init.defaultBranch main 
$> git config --global --edit

# your git config should look like this

[user]
# Please adapt and uncomment the following lines:
        name = <Your Realname>
        email = <Your Email>
[init]
        defaultBranch = main
[push]
        default = current
[color "status"]
  added = green bold italic
  changed = magenta bold
  untracked = cyan
  deleted = red bold strike
  branch = yellow black bold ul

Install GPG

Setup GPG for signing your git commits

$> brew install gpg2

Follow the instructions on Gitlab

Your Git config should look like this now

# This is Git's per-user configuration file.
[user]
# Please adapt and uncomment the following lines:
        name = <Your Realname>
        email = <Your Email>
        signingkey = <Your gpg sec Token>
...

RubyEnv

$> brew install rbenv ruby-build

# IF USING ZSH
$> echo  'eval "$(rbenv init -)"' >> ~/.zshrc
# IF USING BASH
$> echo  'eval "$(rbenv init -)"' >> ~/.bashrc

#Install Ruby
$> rbenv install 3.0.2
$> rbenv global 3.0.2
$> rbenv rehash # or restart terminal
$> gem install bundler
$> rbenv rehash
$> gem install rails
$> rbenv rehash

Postgres

$> brew install postgresql
$> brew services start postgresql
$> createuser -s postgres

# Test Postgres Install

$> ps -aef |grep postgres
$> sudo lsof -i -P | grep LISTEN
$> psql postgres

Setup NVM for managing node.js

Node is used by some of the Javascript packaging libraries and Bootstrap UI Tool kit.

$> brew install nvm
$>  code  ~/.zshrc # example uses VSCode and zshell, you could use Vim or whatever too
# PASTE THESE Lines to the end of our shell config
  export NVM_DIR="$HOME/.nvm"
  [ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"  # This loads nvm
  [ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm"  # This loads nvm bash_completion


#### [For Apple Silicon:](https://michael.codes/posts/nodejs_apple_silicon/)
else...
$> source ~/.zshrc # refresh your terminal session
$> nvm install 14.16.0
$> nvm use 14.16.0
$> nvm alias default 14.16.0

Install imagemagick

This is required for Avatar uploading.

$> brew install imagemagick
$> brew install ghostscript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment