Skip to content

Instantly share code, notes, and snippets.

@matthewhall
matthewhall / .gitconfig
Last active March 1, 2017 15:54
Git aliases.
alias gi="git init"
alias gci="git commit"
alias gcim="git commit -m"
alias gciam="git commit --amend -m"
alias gco="git checkout"
alias gco-="git checkout --"
alias gcob="git checkout -b"
alias gcod="git checkout dev"
alias gcom="git checkout master"
alias gb="git branch"
@matthewhall
matthewhall / gist:2281723
Created April 2, 2012 08:32
Preload set of images using jQuery Deferreds
var preloadImgs = function(srcs) {
srcs = !$.isArray(srcs) ? [srcs] : srcs;
var dfd = $.Deferred(),
promises = [],
img,
len = srcs.length,
defer,
i = 0;