Skip to content

Instantly share code, notes, and snippets.

Jeremy Nagel jeznag

  • COzero
  • Sydney
Block or report user

Report or block jeznag

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
getify /
Last active Jul 9, 2019
BetterPromise: a strawman experiment in subclassing Promise and "fixing" a bunch of its awkward/bad parts

Some things that are "better" with this BetterPromise implementation:

  • BetterPromise # then(..) accepts a BetterPromise (or Promise) instance passed directly, instead of requiring a function to return it, so that the promise is linked into the chain.

    var p = BetterPromise.resolve(42);
    var q = Promise.resolve(10);
lsaffie / pre-commit
Created Aug 5, 2012
pre-commit git hook that checks for values in the FORBIDDEN array
View pre-commit
# Pre commit hook that prevents FORBIDDEN code from being commited.
# Add unwanted code to the FORBIDDEN array as necessary
FORBIDDEN=( debugger ruby-debug )
for i in "${FORBIDDEN[@]}"
You can’t perform that action at this time.