Skip to content

Instantly share code, notes, and snippets.


Dustin Getz dustingetz

View GitHub Profile
View gist:8837731

I like LYAH as a reference and cheat-sheet but I found it a little slow for learning Haskell.

Here's my recommended order for just learning Haskell: 80% completion here is fine if you feel your attention waning, the next thing will address hammering in things like functors and monads via typeclasses. this will hammer in the lessons in a very direct form by forcing you to confront the challenges and lessons learned by the creators and community of Haskell itself. Doing the exercises here is critical for being fluent.

Real World Haskell is available online. I recommend it as a reference only.

View gist:10940534
// Not all of the pipeline is async, but some of it is, so even the non-async functions
// get lifted into a promise (a compliant Promises/A+ impl will lift your functions for free)
.then(function (_) { return { a: 1 }})
.then(function (acc) { return _.extend(acc, { b: 2 }); })
.then(function (acc) { return _.extend(acc, { a: acc.a + 1 }); })
.then(_.bind(this.setState, this))
View gist:2fae2696b298a05564de
/** @jsx React.DOM */
'underscore', 'react', 'wingspan-forms', 'wingspan-cursor'
], function (_, React, Forms, Cursor) {
'use strict';
var FormField = Forms.FormField;
var KendoText = Forms.KendoText;
var KendoComboBox = Forms.KendoComboBox;
var AutoControl = Forms.AutoControl;
View gist:04897a879465d5b11225
'underscore.mixed', 'react', 'wingspan-forms'
], function (_, React, Forms) {
'use strict';
var DateSlider = React.createClass({
displayName: 'DateSlider',
getDefaultProps: _.always({
cursor: undefined
View gist:d3d6490a3af2c2b10d58
'underscore', 'react', 'jquery', 'kendo', 'underscore.string'
], function (_, React, $, kendo, str) {
'use strict';
var KendoPanelBar = React.createClass({
getDefaultProps: function () {
return {
panels: undefined,
dustingetz / gist:018828c0754e0e73f8c8
Created Jul 7, 2014
Dismissible Grid - Dustin's version
View gist:018828c0754e0e73f8c8
'underscore.mixed', 'react', 'wingspan-forms'
], function (_, React, Forms) {
'use strict';
var SelectedRecipientsGrid = React.createClass({
getDefaultProps: function () {
return {
dataSource: undefined, // the datasource as list of records
dustingetz / gist:ee926a14a36137a34b2c
Created Jul 7, 2014
Kendo Grid Picker using native Kendo selection state
View gist:ee926a14a36137a34b2c
'underscore.mixed', 'react', 'jquery', 'wingspan-forms'
], function (_, React, $, Forms) {
'use strict';
var PatientPicker = React.createClass({
displayName: 'PatientPicker',
getDefaultProps: function () {
return {
View gist:240ffacda5edf5802a00
// In lieu of unit tests:
var c1 = window.c1 =;
var c2 = window.c2 =;
console.assert(c1.value === c2.value);
console.assert(c1.onChange === c2.onChange);
console.assert(c1 === c2);
var c10 = c1.refine('very', 'deeply', 'nested', 'counts', '0');
var c20 = c2.refine('very', 'deeply', 'nested', 'counts', '0');
console.assert(c10.value === c20.value);
View gist:9365786981b891af08bf
* Turns an array of promises into a promise for an array. If any of
* the promises gets rejected, the whole array is rejected immediately.
* @param {Array*} an array (or promise for an array) of values (or
* promises for values)
* @returns a promise for an array of the corresponding values
// By Mark Miller
Q.all = all;
dustingetz / gist:1490f9ecd2903203cd99
Created Oct 1, 2014
proper separation of concerns
View gist:1490f9ecd2903203cd99
(ns quiescent-json-editor.core
(:require [cljs.core.async :as a]
[quiescent :as q :include-macros true]
[quiescent.dom :as d])
(:require-macros [cljs.core.async.macros :as am]))
(q/defcomponent App [state dispatcher]
(d/div {}
(d/pre {} (.stringify js/JSON state))
You can’t perform that action at this time.