Skip to content

Instantly share code, notes, and snippets.

@robbiejaeger
Last active October 25, 2018 19:23
Show Gist options
  • Select an option

  • Save robbiejaeger/9795421ecf2232edb0da831fa5310b84 to your computer and use it in GitHub Desktop.

Select an option

Save robbiejaeger/9795421ecf2232edb0da831fa5310b84 to your computer and use it in GitHub Desktop.

Computer Setup (JS Development)

Turn off Elastic Scroll or "Rubber Banding"

In terminal, use command defaults write -g NSScrollViewRubberbanding -int 0

Xcode & Command Line Tools

Do this first as so many things rely on it. Install through app store.

Run xcode-select --install in terminal to complete install.

Terminal - iTerm2

Create .bash_profile file and put in it:

if [ -f $HOME/.bashrc ]; then
        source $HOME/.bashrc
fi

This is so that everything for bash configuration can live in the .bashrc file.

Create .bashrc file with:

https://www.iterm2.com/

Install color package, specifically base16-tomorrow.light.256: https://github.com/chriskempson/base16-iterm2

To add colors in iTerm: Preferences -> Profiles -> Colors tab

In bash profile, modified to:

[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile

# Add git branch name
parse_git_branch() {
     git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\n\[\033[00;1m\]\u: \[\033[34;1m\]\W\[\033[32;1m\]\$(parse_git_branch)\[\033[00m\] $ "

# Add git branch autocomplete
# Had to run "brew install bash-completion" for this too
if [ -f $(brew --prefix)/etc/bash_completion ]; then
    . $(brew --prefix)/etc/bash_completion
  fi

# Create a directory and cd into it
function mkcd () {
     mkdir "$1" && cd "$1"
 }
export PATH="/usr/local/bin:$PATH"

export NVM_DIR="/Users/robbie/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm

source ~/.bashrc

test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"

And

alias gst="git status"
alias ga="git add -A"
alias gc="git commit -m"


# added by travis gem
[ -f /Users/robbie/.travis/travis.sh ] && source /Users/robbie/.travis/travis.sh

Homebrew should be installed in order to have bash autocompletion package.

Text Editor

Linter

Install eslint globally through npm.

Install globally eslint for airbnb. Then create an .eslintrc file at the root directory with the "extends" information for airbnb.

Sublime

Had to create the /usr/local/bin directory.

Install command-line tools:

ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl

In Settings, add autosave:

{
  "color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
  "ignored_packages":
  [
    "Vintage"
  ],
  "save_on_focus_lost": true,
  "tab_size": 2,
  "theme": "Material-Theme.sublime-theme"
}

Hide file preview minimap: Under the View menu there is an option to Show/Hide Minimap

Markdown syntax: https://github.com/jonschlinkert/sublime-markdown-extended To set as default: Navigate through the following menus in Sublime Text: View -> Syntax -> Open all with current extension as... -> Markdown Extended

Homebrew

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

Verify install using brew doctor in terminal. You should see Your system is ready to brew..

Git

Run brew install git in terminal (Homebrew must be installed).

Configure git:

git config --global user.name "John Doe"
git config --global user.email [email protected]

GitHub SSH

https://help.github.com/articles/connecting-to-github-with-ssh/

Node (through NVM)

Run curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.4/install.sh | bash in terminal.

Run nvm install 6.10.2 to install node version (or other latest stable release).

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