Skip to content

Instantly share code, notes, and snippets.

View bmizerany's full-sized avatar
💭
Working on something new

Blake Mizerany bmizerany

💭
Working on something new
View GitHub Profile
#define _PROTO_DATA_SYMBOL String::NewSymbol("data")
....
Handle<String> data = args.This()->Get(_PROTO_DATA_SYMBOL);
Handle<Value> temp = String::Concat(data, String::New("foobar"));
args.This()->Set(_PROTO_DATA_SYMBOL, temp);
Handle<String> data;
RequestParser() : EventEmitter() {
data = String::New("");
}
static Handle<Value>
Parse(const v8::Arguments& args) {
RequestParser *parser = ObjectWrap::Unwrap<RequestParser>(args.This());
var sys = require('sys')
var parser = require('./parser')
var proto = parser.Parser ( )
sys.puts(sys.inspect(proto.parse()))
/*
* Output:
*
* Assertion failed: (handle->InternalFieldCount() > 0), function Wrap, file /usr/local/include/node/node_object_wrap.h, line 37.
node> c = require("crypto")
{ createCredentials: [Function]
, Credentials: [Function]
, Hash: [Function]
, createHash: [Function]
, Sign: [Function]
, createSign: [Function]
, Verify: [Function]
, createVerify: [Function]
}
include $(GOROOT)/src/Make.$(GOARCH)
TARG=borg
GOFILES=\
main.go
include $(GOROOT)/src/Make.cmd
#!/bin/sh
# Hack process to kill all of it's children when STDIN is closed
# Backstory here: (http://www.trapexit.org/forum/viewtopic.php?p=51315)
#
# Usage: killchildren process-that-wont-kill-children [arg1 arg2 ...]
(cat && kill 0) | $*
#!/bin/bash
set -e
API="http://github.com/api/v2/json/repos/create"
function die() {
echo >&2 "$1"
exit 1
}
1> redis:keys("*").
=ERROR REPORT==== 8-Mar-2010::18:33:36 ===
** Generic server redis terminating
** Last message in was {q,[keys,"*"]}
** When Server state == #Port<0.744>
** Reason for termination ==
** {{badmatch,{error,closed}},
[{redis,read_resp,1},
{redis,handle_call,3},
[set, key, value],
[get, key],
[sort, parts]
require 'rubygems'
require 'sinatra'
get '/' do
settings.port.to_s
end