My Developer Environment
Begin with Homebrew or zsh depending on what you are looking for. Use mas
to install the apps that you are missing and you will be good to go 🎉 Still looking to automate vscode and sublime-text plugin installation
Oh My Zsh
$ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
nano
instead of vim
Use I'm not apologetic. Never bothered to learn vim.
echo 'export EDITOR=nano' >> ~/.zshrc
Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install missing apps
# MacOS stats for the menu bar
brew install --cask stats
# Command line App Store installer
brew install mas
mas lucky slack
mas lucky 1Password
mas lucky WhatsApp
mas lucky amphetamine # lately I just type `caffeinate -d` on the terminal
I use Itsycal as a calendar Mac OS extension which is nice <3 Link to mas-cli/mas App Store installer
Zsh improvements
- Frequency-based cd https://github.com/rupa/z
- A plugin I developed myself https://github.com/jsdario/vpn-hint
- Syntax Highlight
cd ~/.oh-my-zsh && git clone git://github.com/zsh-users/zsh-syntax-highlighting.git
+source ~/.oh-my-zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
Git Configuration
To open git config files just type git config -e --global
[user]
name = jriverarubio
email = jriverarubio@apple.com
[core]
editor = nano
excludesfile = /Users/jdario/.gitignore_global
[filter "lfs"]
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
[push]
default = current
[alias]
ci = commit
co = checkout
cp = cherry-pick
st = status
br = branch
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%Creset' --abbrev-commit
graph = log --graph --all '--pretty=format:%Cred%h%Creset %ad | [%C(bold blue)%an%Creset] %Cgreen%d%Creset %s' --date=iso
rem = remote
ls = rem -v
pl = pull --rebase
sm = submodule
pr = pull-request --target-branch master
undo = reset --soft HEAD^
conflicts = !git ls-files -u | cut -f 2 | sort -u
compare = !git diff master..."$(git symbolic-ref --short HEAD)"
amend = commit -a --amend --no-edit
unstash = stash pop
[branch]
autoSetupMerge = always
[merge]
ff = true
Use git pr to create a Pull Request directly on github. If 2FA is activated you must create a token and use it as password
brew install python3
pip3 install git-pull-request
# You may need to create a .netrc file with credentials
fancy diffs:
To havenpm i -g diff-so-fancy
git diff --color | diff-so-fancy | less --tabs=4 -RFX
And to setup:
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
fancy cat
To havepip3 install pygments
alias ccat='pygmentize -f terminal256 -O style=native -g'
The Silver Searcher
brew install the_silver_searcher
Editors
Sublime Merge
Easier and more confident merges https://www.sublimemerge.com/download
Link the binary to a folder in $PATH so you can run it from the command line
ln -s "/Applications/Sublime Merge.app/Contents/SharedSupport/bin/smerge" ~/bin/smerge