Skip to content

Instantly share code, notes, and snippets.

View oconnore's full-sized avatar

Eric O'Connor oconnore

View GitHub Profile
@oconnore
oconnore / sel.hs
Created May 28, 2014 23:57
Line / Whitespace selection tool
import System.IO
import System.Environment
import Text.Printf
import Data.Char
import Data.Set
import Data.List
import Text.Regex
import Text.Regex.Posix
printList :: [String] -> IO ()
@oconnore
oconnore / stream-errors.js
Created May 13, 2014 03:27
Why is the last error unhandled?
var s = require('stream');
var mys;
/* ========================================================
Error callback first, throw
======================================================== */
mys = Object.create(s.Readable.prototype);
mys._read = function(size) {
this.emit('error', new Error('test'));