This file contains 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 http = require('http') | |
, assert = require('assert') | |
, request = require('./') | |
, url = require('url') | |
, path = 'http://localhost/test' | |
http.createServer(function (req, res) { | |
assert.equal('/test?foo=bar', req.url) | |
res.end() | |
}).listen(0, function () { |
This file contains 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 ffi = require('node-ffi') | |
, objc = new ffi.Library('libobjc', { | |
objc_msgSend: [ 'pointer', [ 'pointer', 'pointer', ] ] | |
, objc_getClass: [ 'pointer', [ 'string' ] ] | |
, sel_registerName: [ 'pointer', [ 'string' ] ] | |
// try/catch | |
, objc_begin_catch: [ 'pointer', [ 'pointer' ] ] | |
, objc_end_catch: [ 'void', [] ] | |
}) | |
, NSObject = objc.objc_getClass('NSObject') |
This file contains 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
diff --git a/src/ffi.h b/src/ffi.h | |
index fe29e71..770bc73 100644 | |
--- a/src/ffi.h | |
+++ b/src/ffi.h | |
@@ -40,49 +40,49 @@ class Pointer : public ObjectWrap { | |
Pointer(unsigned char *ptr); | |
~Pointer(); | |
- static void Initialize(Handle<Object> Target); | |
- static Handle<Object> WrapInstance(Pointer *inst); |
This file contains 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
description "My NodeJS Server" | |
author "Nathan Rajlich" | |
# Upstart has nothing in $PATH by default | |
env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
# Keep the server running on crash or machine reboot | |
respawn | |
start on runlevel [23] |
This file contains 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
function Parent () { | |
this.blah = 'test'; | |
} | |
function Child () { | |
} | |
Child.prototype = new Parent() | |
var instance = new Child() |
This file contains 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
From 47554e9443ba8882cfdb0008a1bb93a57d491270 Mon Sep 17 00:00:00 2001 | |
From: Nathan Rajlich <nathan@tootallnate.net> | |
Date: Tue, 23 Aug 2011 10:39:23 -0700 | |
Subject: [PATCH] Use Object.getPrototypeOf() on the object in the REPL tab-completion. | |
Some people use __proto__ to augment an Object's prototype after it's been created. | |
This patch helps make the "new" prototype properties visible if necessary. | |
This is also more consistent with the while logic below. | |
--- |
This file contains 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
<?xml version='1.0'?> | |
<signatures version="1.0"> | |
<depends_on path="/System/Library/Frameworks/CoreFoundation.framework" /> | |
<depends_on path="/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework" /> | |
<depends_on path="/System/Library/Frameworks/SystemConfiguration.framework" /> | |
<depends_on path="/System/Library/Frameworks/Security.framework" /> | |
<depends_on path="/System/Library/Frameworks/CoreServices.framework" /> | |
<depends_on path="/System/Library/Frameworks/IOKit.framework" /> | |
<struct name="NSAffineTransformStruct" type64="{_NSAffineTransformStruct="m11"d"m12"d"m21"d"m22"d"tX"d"tY"d}" type="{_NSAffineTransformStruct="m11"f"m12"f"m21"f"m22"f"tX"f"tY"f}" /> | |
<struct name="NSDecimal" opaque="true" type="{_NSDecimal="_exponent"b8"_length"b4"_isNegative"b1"_isCompact"b1"_reserved"b18"_mant |
This file contains 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
Unbrewed dylibs were found in /usr/local/lib. | |
If you didn't put them there on purpose they could cause problems when | |
building Homebrew formulae, and may need to be deleted. | |
Unexpected dylibs: | |
/usr/local/lib/libpng14.14.dylib | |
Unbrewed static libraries were found in /usr/local/lib. |
This file contains 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
From 5bc0ea9f3f1bff00f1a983ea47877d1bf0b1d1f3 Mon Sep 17 00:00:00 2001 | |
From: Nathan Rajlich <nathan@tootallnate.net> | |
Date: Thu, 1 Sep 2011 11:18:29 -0700 | |
Subject: [PATCH] Don't use the NODE_MODULE macro. | |
What's the point of this? Seems to work fine without it! And it seems some | |
strange setups don't have this macro defined anyways... | |
--- | |
time.cc | 7 ++----- | |
1 files changed, 2 insertions(+), 5 deletions(-) |
This file contains 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 $ = require('./') | |
$.import('Foundation') | |
var pool = $.NSAutoreleasePool('alloc')('init') | |
var plist = $.NSMutableDictionary('alloc')('init') | |
plist('setValue', $._('val'), 'forKey', $._('key')) | |
// write out to a plist file | |
plist('writeToFile', $._('filepath.plist'), 'atomically', true) |