Skip to content

Instantly share code, notes, and snippets.

View robhanlon22's full-sized avatar

Rob Hanlon robhanlon22

View GitHub Profile
// node_server.js
var db = requre('./db');
app.get('/getTest', function(request, response) {
var testId = 1;
db.getTest(testId, function (err, data) {
// I don't actually know how to send data using express.
response.pumpThatShitOut(data);
});
@robhanlon22
robhanlon22 / gist:2975121
Created June 22, 2012 20:56 — forked from vogon/gist:2975094
shit that doesn't work
module CLR
class MDTable
class << self
def dump
puts @schema
end
def word(name)
@schema << "word #{name};"
end
p ->(n) {
y = ->(*a, &b) { z = ->(*a) { b.(*a, &z) } }
y.() { |f, &b|
i, g = f.()
i <= n ? [i] + b.(g) : []
}.(y.() { |i, j, &b| -> { [j, b.(j, i + j)] } }.(1, 1))
}.([8877,
5745,
2197,
9747,
RESCUED TYPE A
RESCUED TYPE B
test_splat_with_rescue.rb:8:in `a': ohhhhh we raised a type C (C)
from test_splat_with_rescue.rb:16