Skip to content

Instantly share code, notes, and snippets.

View dwrensha's full-sized avatar

David Renshaw dwrensha

View GitHub Profile
var capnp = require("capnp");
var SandstormHttpBridge =
require("./sandstorm/sandstorm-http-bridge.capnp").SandstormHttpBridge;
var HackSessionContext =
require("./sandstorm/hack-session.capnp").HackSessionContext;
var http = require('http');
http.createServer(function (req, res) {
var sessionId = req.headers["x-sandstorm-session-id"];

Keybase proof

I hereby claim:

  • I am dwrensha on github.
  • I am dwrensha (https://keybase.io/dwrensha) on keybase.
  • I have a public key whose fingerprint is 6B74 86EA 8735 76FD 7284 5C5E 50E4 D738 4B1B 4D65

To claim this, I am signing this object:

@dwrensha
dwrensha / raw_connect_handler.js
Last active August 29, 2015 14:06
detecting request cancellation in WebApp.rawConnectHandlers
/*
I start this in one terminal and in another I do `curl 127.0.0.1:3000` and immediately ctrl-C.
The output is:
$ meteor
[[[[[ ~/Desktop/raw_connect_handler_test ]]]]]
=> Started proxy.
=> Started MongoDB.
=> Started your app.
struct Foo {
x : Vec<int>, y : Vec<int>
}
fn main () {
let foo = box Foo { x : vec![1,2,3], y : vec![4,5,6]};
let box Foo { x, y } = foo;
}