Skip to content

Instantly share code, notes, and snippets.


Jeremy Nagel jeznag

  • COzero
  • Sydney
View GitHub Profile
getify /
Last active Oct 15, 2020
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.