This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Handle<String> data; | |
RequestParser() : EventEmitter() { | |
data = String::New(""); | |
} | |
static Handle<Value> | |
Parse(const v8::Arguments& args) { | |
RequestParser *parser = ObjectWrap::Unwrap<RequestParser>(args.This()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node> c = require("crypto") | |
{ createCredentials: [Function] | |
, Credentials: [Function] | |
, Hash: [Function] | |
, createHash: [Function] | |
, Sign: [Function] | |
, createSign: [Function] | |
, Verify: [Function] | |
, createVerify: [Function] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include $(GOROOT)/src/Make.$(GOARCH) | |
TARG=borg | |
GOFILES=\ | |
main.go | |
include $(GOROOT)/src/Make.cmd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) | $* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
API="http://github.com/api/v2/json/repos/create" | |
function die() { | |
echo >&2 "$1" | |
exit 1 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[set, key, value], | |
[get, key], | |
[sort, parts] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'sinatra' | |
get '/' do | |
settings.port.to_s | |
end |