Setting Up My Mac Dev Environment

No Comments

Set up a package manager: Homebrew

Istall iterm2

ZSH

Replace bash with zsh (it offers some nice plugins and themes).

brew install zsh zsh-completions

Install oh-my-zsh – “A delightful community-driven (with 1,000+ contributors) framework for managing your zsh configuration.”

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

To update oh-my-zsh, run upgrade_oh_my_zsh in zsh shell.

Pick your set of plugins (edit .zshrc file):
plugins=(git brew gem ruby rvm rails yarn npm)

Pick a theme (.zshrc):

ZSH_THEME="af-magic"

You can checkout available <a href="https://github.com/robbyrussell/oh-my-zsh/wiki/themes" target="_blank">themes</a> and <a href="https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins" target="_blank">plugins</a>

<h3>Add SSH Keys</h3>
<a href="https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/" target="_blank">Set up SSH keys for Github</a>
Add generated ssh key to your keychain, so you don't have to reenter your ssh passphrase:

ssh-add -K ~/.ssh/id_rsa

If you're on OSX Sierra, then you need another step:
create ~/.ssh/config with this content:

Host *
  UseKeychain yes
  AddKeysToAgent yes
  IdentityFile ~/.ssh/id_rsa

Still run ssh-add -K ~/.ssh/id_rsa

Rails/Ruby/RVM/rbenv

If using rvm with zsh, add this to your .zshrc:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

If you use rbenv, you may need to add this to your .zshrc:

export PATH="$HOME/.rbenv/shims :$PATH"
eval "$(rbenv init -)"

Exercism

For exercism zsh completions, add

if [ -f ~/.config/exercism/exercism_completion.zsh ]; then
. ~/.config/exercism/exercism_completion.zsh
fi

And run

$ mkdir -p ~/.config/exercism/
$ curl http://cli.exercism.io/exercism_completion.zsh > ~/.config/exercism/exercism_completion.zsh

git standup

git-standup

brew install git-standup

fzf is a general-purpose command-line fuzzy finder

https://github.com/junegunn/fzf#key-bindings-for-command-line

brew install fzf
# Install shell extensions
/usr/local/opt/fzf/install

autojump - a faster way to navigate your filesystem

https://github.com/wting/autojump

brew install autojump

# add autoload to .zshrc
[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh

fkill - Fabulously kill processes

https://github.com/sindresorhus/fkill-cli
https://github.com/SamVerschueren/alfred-fkill

npm install --global fkill-cli
npm install --global alfred-fkill

Mac apps

Git alias (add to .gitconfig)

Show recent branches:
[alias]
recent = "for-each-ref --sort=-committerdate --count=10 --format='%(refname:short)' refs/heads/"

Atom configs

Plugins:

  • Pigments
  • Project Manager
  • Atom Beautify
  • got-definition
  • language-elixir
  • autocomplete-elixir
  • last-cursor-position
  • linter-lixirc
  • linter-eslint
  • liner-rubocop
  • prettier-atom

Integration with alfred:

npm install -g alfred-atom.
Categories: Development Setup, git

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Loading Facebook Comments ...