Skip to content

Instantly share code, notes, and snippets.

@lukemorton
lukemorton / .gitconfig
Created July 20, 2015 10:26
Aliases for git
[alias]
st = status -sb
co = checkout
cp = cherry-pick
ci = commit
br = branch
sub = submodule
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
undo = reset HEAD^
@kottenator
kottenator / simple-pagination.js
Created July 13, 2015 20:44
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;
@SebAshton
SebAshton / partial-search.sh
Created June 23, 2014 09:35
CLI Improvements
#Add this to ~/.inputrc to enable partial searching of bash history with arrow keys
## arrow up
"\e[A":history-search-backward
## arrow down
"\e[B":history-search-forward