Skip to content

Instantly share code, notes, and snippets.

Pete Hodgson moredip

Block or report user

Report or block moredip

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
moredip / run-command-on-git-revisions
Created May 8, 2011
A quieter version of Gary Bernhardt's script, with timestamps
View run-command-on-git-revisions
# This script runs a given command over a range of Git revisions. Note that it
# will check past revisions out! Exercise caution if there are important
# untracked files in your working tree.
# This came from Gary Bernhardt's dotfiles:
# Example usage:
moredip /
Last active Jul 3, 2017


A helper function that lets us write stateful React components in the same functional style as stateless components.


  • sidesteps the need to introduce class and this-binding confusion into your codebase.
  • slightly terser, slightly more declarative
  • opinionated - doesn't expose the more dangerous features of class-based Components (e.g. lifecycle callbacks)

When you have a team working on a larger React codebase it is hard for everyone to understand which patterns are preferable vs. those which are a necessary compromise.

moredip / part-app.js
Last active Jul 13, 2017
Introduce Partial Application
View part-app.js
const priceByCommodityAndCountry = {
'MANGO': [
origin: 'US',
price: 101
origin: 'BR',
price: 120
moredip /
Created Apr 9, 2012
Alternative functional approach to dealing with the async pyramid. This is a response to
validate = (customer, next)->
console.log 'validating...'
insert = (customer, next)->
console.log 'inserting...'
# insert into DB (asynchronously of course), and then call...
moredip / test.json
Created Nov 28, 2012
A small sample JSON file
View test.json
You can’t perform that action at this time.