Skip to content

Instantly share code, notes, and snippets.

View nevf's full-sized avatar

Neville Franks nevf

View GitHub Profile
@benjamingr
benjamingr / gist:0237932cee84712951a2
Last active October 6, 2023 08:31
Promise unhandled rejection tracking global handler hook

Possibly Unhandled Rejection NodeJS Promise Hook

###Unhandled Rejection Tracking

Several promise libraries such as bluebird and when as well as some native promise implementations offer potentially unhandled rejection tracking. This means that the following:

Promise.reject(new Error("err")); // never attach a `catch`
@staltz
staltz / introrx.md
Last active May 9, 2024 07:59
The introduction to Reactive Programming you've been missing
@domenic
domenic / promises.md
Last active March 31, 2024 14:07
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@cburgmer
cburgmer / htmlparser.js
Created June 5, 2012 20:46
John Resig's JavasScript HTML parser with bug fixes for parsing <script> & <style>
/*
* HTML Parser By John Resig (ejohn.org)
* Original code by Erik Arvidsson, Mozilla Public License
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
*
* // Use like so:
* HTMLParser(htmlString, {
* start: function(tag, attrs, unary) {},
* end: function(tag) {},
* chars: function(text) {},
@medmunds
medmunds / knockout-jquery-ui-widget.js
Created March 27, 2011 17:35
Knockout binding for jQuery.ui.widget
// knockout-jquery-ui-widget.js
// Copyright (c) 2011, Planapple, Inc.
// License: MIT (http://www.opensource.org/licenses/mit-license.php)
//
// Knockout binding for jQuery UI widgets
//
// Examples:
// <input type="submit" value="OK" data-bind='jqueryui: "button"' />
//
// Attaches a jQuery UI button widget to this button, with default options.