Code snippets for the jsBlackBelt blog