Setup mac for development guide

General

Development tools for mac

xcode-select --install

Homebrew

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

To make http requests:

brew install wget

More information about Homebrew here

Sublime

brew cask install sublime-text

Htop

brew install htop

Shell

iTerm2

brew cask install iterm2

oh My Zsh

sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"

Configure Agnoster theme in your file .zshrc

ZSH_THEME="agnoster"

Remember to install Power Line Fonts (more information here)

# clone
git clone https://github.com/powerline/fonts.git --depth=1
# install
cd fonts
./install.sh
# clean-up a bit
cd ..
rm -rf fonts

More information about config here

IMPORTANT!! After installation configure on iTerm Profiles > Text > Font > Meslo LG DZ for Powerline

Plugins Zsh

For fancy highlighting syntax on the shell

brew install zsh-syntax-highlighting

Then configure at the end of your .zshrc

source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

More information about this plugin here

For auto suggestions on the shell

brew install zsh-autosuggestions

Then configure at the end of your .zshrc

source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh

More information about this plugin here

For historic command line finder

brew install fzf
# To install useful key bindings and fuzzy completion:
$(brew --prefix)/opt/fzf/install

Then configure at the end of your .zshrc

[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

More information about this plugin here

For getting information about Computer on shell startup

brew install neofetch

To run neofetch we need as requirement

brew install w3m

Copy your desired startup image on $home/.config/neofetch/pictures/your_image.png

Then configure at the end of your .zshrc

neofetch --iterm2 /Users/gerard/.config/neofetch/pictures/your_image.png

More information about this plugin here

For OSX utilities Add in your .zshrc the following plugin

plugins=(... osx)

More information about this plugin here

To fix last working directory Add in your .zshrc the following plugin

plugins=(... last-working-directory)

More information about this plugin here

For navigate through the commands history Add in your .zshrc the following plugin

plugins=(... history)

For Google search Add in your .zshrc the following plugin

plugins=(... web-search)

For avoid to type sudo always Add in your .zshrc the following plugin

plugins=(... sudo)

To navigate very quickly to any already visited directory Add in your .zshrc the following plugin

plugins=(... z)

Aliases on zshrc file

# show all the directories visited on the current terminal session
alias dirsh="dirs -v | fzf"

# update zsh configuration
alias update="source ~/.zshrc"

# check which process is running on a specific port
alias runp='f() {lsof -i :$1};f'

# check directory space
alias usage="du -h -d1"

# my ip
alias myip="curl http://ipecho.net/plain; echo"

# go to ssh dir
alias sshdir="cd ~/.ssh"

# zsh current version
alias zversion="zsh --version"

Modify prompt zsh

Add at the end of your .zshrc the following code

prompt_context() {
  # Custom (Random emoji)
  emojis=("🔥💀🔥")
  RAND_EMOJI_N=$(( $RANDOM % ${#emojis[@]} + 1))
  prompt_segment black default "${emojis[$RAND_EMOJI_N]} "
}

Other

brew install imagemagick
brew install hub

Scripts

In order to make automatic pull requests from the terminal, this script fits perfectly. Please configure company and repository.