Skip to content

Instantly share code, notes, and snippets.

Theo Schlossnagle postwait

Block or report user

Report or block postwait

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
postwait / gist:700850
Created Nov 15, 2010
amqp mem issues
View gist:700850
var amqp = require('amqp'),
sys = require('sys');
var mqhost = process.argv[2];
var exchange_name = process.argv[3];
function expensive_op(str) {
return str;
var listen = function(f) {
postwait / gist:749421
Created Dec 21, 2010
ECONNABORTED should be ignored
View gist:749421
diff --git a/src/ b/src/
index d4448aa..de3bb6b 100644
--- a/src/
+++ b/src/
@@ -484,6 +484,7 @@ static Handle<Value> Accept(const Arguments& args) {
if (peer_fd < 0) {
if (errno == EAGAIN) return scope.Close(Null());
+ if (errno == ECONNABORTED) return scope.Close(Null());
return ThrowException(ErrnoException(errno, "accept"));
postwait / gist:825441
Created Feb 14, 2011
sample use of tls in node.js v0.4
View gist:825441
nc.prototype.start = function(conncb) {
var parent = this;
this.conncb = conncb;
this.socket = tls.connect(this.port,,this.creds,
function() {
if(parent.socket.authorized == false) {
sys.puts('invalid cert: ' + parent.socket.authorizationError);
throw('invalid cert: ' + parent.socket.authorizationError);
View gist:869576
diff --git a/lib/tls.js b/lib/tls.js
index a951c97..78e191c 100644
--- a/lib/tls.js
+++ b/lib/tls.js
@@ -509,32 +509,44 @@ exports.createSecurePair = function(credentials,
* completed negotiation and emit 'secure' from here if it has.
SecurePair.prototype._cycle = function() {
+ depth = depth ? depth : 0;
if (this._done) {
View gist:896429
<lua loader="lua">
<module name="oracle" object="noit.module.jezebel"/>
<module name="sqlserver" object="noit.module.jezebel"/>
<module name="jmx" object="noit.module.jezebel"/>
View gist:1179235

For running nad, man nad.

These are the poor man's docs.


nad will run scripts from the config directory; only from that and not subdirectories. The best practice it to write your scripts in subdirectories of the config dir and soft link to them to enable

View gist:1189570

HTTP Accept Filters for Solaris

Once built and installed: (make install), you can load these with

 soconfig -F httpf httpf prog 2:2:0,2:2:6,26:2:0,26:2:6

Then applications must programatically enable them immediately after socket() and before bind() with a setsockopt() call as follows:

View gist:1232954
diff --git a/src/noit_conf_checks.c b/src/noit_conf_checks.c
index 239feb1..b909c55 100644
--- a/src/noit_conf_checks.c
+++ b/src/noit_conf_checks.c
@@ -461,6 +461,7 @@ noit_console_show_check(noit_console_closure_t ncct,
nc_printf(ncct, " name: %s [from module]\n", module ? module : "[undef]");
nc_attr_show(ncct, "module", node, mnode, module);
+ SHOW_ATTR(resolve_rtype);
View gist:1256540
; ldd /usr/lib/ => /lib/ => /lib/ => /lib/ => /lib/ => /lib/ => /lib/ => /lib/ => /lib/ => /lib/
View gist:1358906
<acl name="aname">
<network type="allow" ip=""/>
<network type="deny" ip=""/>
<network type="allow" ip=""/>
You can’t perform that action at this time.