Skip to content

Instantly share code, notes, and snippets.

@scheffield
Last active June 4, 2019 14:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save scheffield/be2dfdd47292b2828c0a to your computer and use it in GitHub Desktop.
Save scheffield/be2dfdd47292b2828c0a to your computer and use it in GitHub Desktop.
Setting up a dev mac
[user]
name = Max Scheffler
email = max@canva.com
[alias]
co = checkout
ci = commit
cia = !git add -A && git commit
ciad = !git add -A && git commit -m "."
st = status
br = branch
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
type = cat-file -t
dump = cat-file -p
up = !git fetch origin && git rebase origin/master
halp = !git for-each-ref --count=30 --sort=-committerdate refs/heads --format='%(HEAD)%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)' |column -ts'|'
get = "!f(){ git fetch && git checkout $1 && git reset --hard origin/$1; };f"
new = "!f(){ git co -b max-$1 origin/master && git pull; };f"
amend = commit -a --amend --no-edit
[core]
editor = vim
[push]
default = simple
[credential]
helper = osxkeychain
[fetch]
prune = true
[filter "lfs"]
required = true
process = git-lfs filter-process
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
export ZSH=/Users/scheffield/.oh-my-zsh
ZSH_THEME="ducknorris"
plugins=(git brew brew-cask cp aws)
# User configuration
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
source $ZSH/oh-my-zsh.sh
export JAVA_HOME=$(/usr/libexec/java_home)
eval `/usr/libexec/path_helper -s`
#export GOOGLE_APPLICATION_CREDENTIALS=/Users/scheffield/Downloads/Canva-d0b017232dc4.json
export CHROME_BIN="/usr/local/Caskroom/google-chrome/latest/Google Chrome.app/Contents/MacOS/Google Chrome"
export ANDROID_HOME=$HOME/Library/Android/sdK
export PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
# some directories
mkdir -p ~/projects/private ~/projects/playground ~/projects/canva ~/opt
# xcode cli
xcode-select --install
# brew.sh (will install build tools as well)
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# some casks
brew cask install dropbox google-chrome java atom caffeine firefox spotify slack flux android-studio kap zeplin iterm2
# some packages
brew install wget htop git gradle maven openssl tig vim imagemagick perceptualdiff
# https://github.com/amix/vimrc
wget https://raw.githubusercontent.com/amix/vimrc/master/vimrcs/basic.vim -P /tmp/ && cp /tmp/basic.vim ~/.vimrc
# shell and terminal
brew install zsh
# iterm2 upstream - don with cask
# wget http://iterm2.com/nightly/latest -P /tmp && unzip /tmp/latest -d /tmp/iTerm && mv /tmp/iTerm/iTerm.app ~/Applications
# fonts for zsh
git clone https://github.com/powerline/fonts.git /tmp/powerline-fonts && /tmp/powerline-fonts/install.sh
# oh my zsh
wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh
# oh-my-zsh theme
wget https://gist.githubusercontent.com/leonardofaria/a1157565e5291d3b607e/raw/73f89b2579e4136efbfaa661ba654ca57f3aaaf0/ducknorris.zsh-theme -P ~/.oh-my-zsh/themes
# configure iterm2: General > Preferences > Load preferences...
# /Users/scheffield/Dropbox/documents/mac_config
# menumeter for 10.11
# http://member.ipmu.jp/yuji.tachikawa/MenuMetersElCapitan/
# nvm and node
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | bash
nvm install v5
nvm alias default v5
apm install atom-beautify file-icons git-blame git-history git-log git-plus highlight-selected hyperclick javascript-snippets js-hyperclick jsformat language-terraform merge-conflicts minimap minimap-git-diff minimap-highlight-selected open-recent script
# enable dot files in finder:
defaults write com.apple.finder AppleShowAllFiles YES
# installing patched monaco font (this is the default font for iterm2 in 10.10)
wget https://github.com/supermarin/powerline-fonts/raw/master/Monaco/Monaco%20for%20Powerline.otf -P ~/Library/Fonts/
# configure iterm2 using this fonts Preferences... > Profiles > Default > Text > (Font & Non-ASCII Font) > Change Font
# https://github.com/jeremyFreeAgent/oh-my-zsh-powerline-theme
# https://github.com/KuoE0/oh-my-zsh-solarized-powerline-theme
# https://github.com/milkbikis/powerline-shell
# https://gist.github.com/kevin-smets/8568070
# https://coderwall.com/p/sun7za/mac-os-x-oh-my-zsh-theme-on-iterm2
#git clone https://github.com/KuoE0/oh-my-zsh-solarized-powerline-theme.git ~/opt/oh-my-zsh-solarized-powerline-theme
#ln -s ~/opt/oh-my-zsh-solarized-powerline-theme/solarized-powerline.zsh-theme ~/.oh-my-zsh/themes
#ZSH_THEME="solarized-powerline"
# http://osxdaily.com/2012/01/30/encrypt-and-decrypt-files-with-openssl/
openssl des3 -in file.txt -out encrypted.txt
openssl des3 -d -in encrypted.txt -out normal.txt
# https://github.com/zaiste/vimified
curl -L https://raw.github.com/zaiste/vimified/master/install.sh | sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment