Skip to content

Instantly share code, notes, and snippets.

Partap Davis partap

Block or report user

Report or block partap

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
partap / gist:4677744
Last active Dec 11, 2015
bash: parse number range from command line
View gist:4677744
USAGE="Usage: $0 plateid1 [plateid2 ...]
(plateids can also be a range xxx-yyy)"
if [ "$#" == "0" ]; then
echo "$USAGE"
exit 1
partap / gist:4588807
Last active Dec 11, 2015
Sequential loading with jquery Deferred
View gist:4588807
// a is a jquery collection
// fn is a function that returns a promise
function loadItems(a, fn) {
var d = $.Deferred();
var next = d.promise();
a.each(function () {
var that = this;
next = next.pipe(function () {
You can’t perform that action at this time.