I hereby claim:
- I am spencewood on github.
- I am spencewood (https://keybase.io/spencewood) on keybase.
- I have a public key ASArd6_IG7kmq270KYuda8hsGensCA4yfBGZtxJlti9azwo
To claim this, I am signing this object:
I am attesting that this GitHub handle spencewood is linked to the Tezos account tz1S5KnFCBLzjPK1ysdH4x1L9pskqi6JRZu3 for tzprofiles | |
sig:edsigu1gro5JTNEE4C1bBv3rJdh8gJ9HhDfBjoE9xW6EkZxiHiBQ1cZr8wb7K5r7FvQy9MGGsTKMkhweSH9JhZopkX4FEDfRyer |
I hereby claim:
To claim this, I am signing this object:
_.mixin({ | |
nestedPluck: function nestedPluck(arr) { | |
var plucks = _.rest(arguments); | |
if (plucks.length > 0) { | |
var a = _.flatten(_.pluck(arr, plucks.shift()), true); | |
return nestedPluck.apply(null, [a].concat(plucks)); | |
} | |
return arr; | |
} | |
}); |
_.mixin({ | |
average: function (arr) { | |
return _.reduce(arr, function (memo, num) { | |
return memo + num; | |
}, 0) / arr.length; | |
} | |
}); |
_.mixin({ | |
pipeline: function (seed) { | |
return _.rest(_.toArray(arguments)).reduce(function (l, r) { | |
return r(l); | |
}, seed); | |
} | |
}); |
# http://henrik.nyh.se/2008/12/git-dirty-prompt | |
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
# username@Machine ~/dev/dir[master]$ # clean working directory | |
# username@Machine ~/dev/dir[master*]$ # dirty working directory | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" |