Skip to content

Instantly share code, notes, and snippets.

Ry Dahl ry

Block or report user

Report or block ry

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
View ngx_queue.h
/*
* Copyright (C) Igor Sysoev
*/
#include <stddef.h> /* offsetof() */
#ifndef _NGX_QUEUE_H_INCLUDED_
#define _NGX_QUEUE_H_INCLUDED_
We couldn’t find that file to show.
View gist:155877
// Answer to http://github.com/ry/http-parser/issues/#issue/1
// UNTESTED
struct line {
char *field;
size_t field_len;
char *value;
size_t value_len;
};
View gcrypt.h
/* gcrypt.h - GNU Cryptographic Library Interface -*- c -*-
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006
2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of Libgcrypt.
Libgcrypt is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of
the License, or (at your option) any later version.
View gist:222164
/* Copyright (c) 2009 Ryan Dahl <ry@tinyclouds.org>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
View gist:249750
db.query('SELECT 1')
('result1', function(result1) {
return db.query('SELECT 2');
})
('result2', function(result2) {
return db.query('SELECT 3');
})
('result3')
.addCallback(function(results) {
p(results); // == {result1: result1, result2: result2, result3: result}
View gist:250158
cloth 0 ~/projects/node > git diff --stat $(git rev-list -1 --until="5 hours ago" HEAD) -- **/*.js
lib/dns.js | 48 +++++-
lib/sys.js | 8 +-
src/node.js | 331 ++++++++++++++++++++++++++++++-------
test/mjsunit/disabled/test-dns.js | 29 ++++
4 files changed, 350 insertions(+), 66 deletions(-)
cloth 0 ~/projects/node > git diff --stat $(git rev-list -1 --until="5 hours ago" HEAD) -- **/*.{cc,h}
src/node.cc | 1 -
src/node_dns.cc | 94 ++++++++++----
src/node_events.cc | 138 --------------------
View gist:250922
diff --git a/src/node.js b/src/node.js
index c8f55c6..c0cd5db 100644
--- a/src/node.js
+++ b/src/node.js
@@ -536,6 +536,7 @@ var posixModule = createInternalModule("posix", function (exports) {
exports.read = function (fd, length, position, encoding) {
var promise = new process.Promise()
+ encoding = encoding | "binary";
process.fs.read(fd, length, position, encoding, callback(promise));
View net.js
var debugLevel = 0;
if ('NODE_DEBUG' in process.ENV) debugLevel = 1;
function debug (x) {
if (debugLevel > 0) {
process.stdio.writeError(x + '\n');
}
}
var assert = process.assert;
View reap_children.gitdiff
diff --git a/src/node.js b/src/node.js
index 69416d0..4ba4432 100644
--- a/src/node.js
+++ b/src/node.js
@@ -71,6 +71,8 @@ node.inherits = function () {
};
+var childProcesses = [];
+
You can’t perform that action at this time.