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
moredip / gist:3080744
Created Jul 10, 2012
Simple Privacy Policy
View gist:3080744
We don't have access to and will not store, or use any of your information or data or stuff for any reason.
@moredip
moredip / registerCustomer.coffee
Created Apr 9, 2012
Alternative functional approach to dealing with the async pyramid. This is a response to http://wekeroad.com/2012/04/05/cleaning-up-deep-callback-nesting-with-nodes-eventemitter/
View registerCustomer.coffee
validate = (customer, next)->
console.log 'validating...'
#VALIDATE HERE
next()
insert = (customer, next)->
console.log 'inserting...'
# insert into DB (asynchronously of course), and then call...
next()
View closure-encapsulates-object-state.js
function createDuck( name ){
var duck = {
fullName: function(){ name + " duck"; }
};
return duck;
};
@moredip
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
#!/bin/bash
#
# 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:
# https://github.com/garybernhardt/dotfiles
#
# Example usage:
View sh-objc.js
/**
* Code Syntax Highlighter for Objective-C.
* Version 0.0.2
* Copyright (C) 2006 Shin, YoungJin.
* http://www.jiniya.net/lecture/techbox/test.html
*
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
You can’t perform that action at this time.