Skip to content

Instantly share code, notes, and snippets.

[alias]
rb = rebase
undo = reset --soft HEAD^
st = status
ci = commit
br = branch
co = checkout
df = diff
lg = log -p
lp = log --pretty=oneline --graph --all
@laurencedorman
laurencedorman / boolean-promise.js
Created May 25, 2016 08:59
Start a promise chain from a Boolean
var p = Promise[(someCondition)?"resolve":"reject"]();
@laurencedorman
laurencedorman / zsh theme
Last active September 16, 2016 08:00
zsh theme
local user_host="%{$fg[yellow]%}%}%n@%m%{$reset_color%}"
local current_dir="%{$fg[cyan]%}%8~%{$reset_color%}"
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
PROMPT='${user_host} ${current_dir} %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}
${ret_status} %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"