Skip to content

Instantly share code, notes, and snippets.

View tjfontaine's full-sized avatar

Timothy J Fontaine tjfontaine

View GitHub Profile
diff --git a/lib/_http_client.js b/lib/_http_client.js
index 929be3f..5495da6 100644
--- a/lib/_http_client.js
+++ b/lib/_http_client.js
@@ -308,11 +308,17 @@ function socketOnData(d) {
var ret = parser.execute(d);
if (ret instanceof Error) {
- debug('parse error');
- freeParser(parser, req, socket);
Load command 92
cmd LC_SEGMENT_64
cmdsize 72
segname
vmaddr 0x00007fff99c5a000
vmsize 0x0000000000199000
fileoff 1034305536
filesize 1675264
maxprot 0x00000001
initprot 0x00000001
#!/bin/bash
## s/^|\s\+\(\w\+\)\s\+|\s\+\(.*\)\s\+|\s\+\(.*\)\s*|/sdc-policy create --name="can \1" --rules="can \1" --description="can \3"/
## s/^|\s\+\(\w\+\)\s\+|\s\+\(.*\)\s\+|/sdc-policy create --name="can \1" --rules="can \1"/
set -xe
sdc-policy create --name="can putdirectory" --rules="can putdirectory" --description="can create directories, update directory metadata "
sdc-policy create --name="can getdirectory" --rules="can getdirectory" --description="can list contents of directories "
sdc-policy create --name="can deletedirectory" --rules="can deletedirectory" --description="can delete (empty) directories "

Node.js 0.12 is near, and we need your help to make it happen!

The state of Node.js 0.12

The v0.12 branch has been created recently and we're currently focused on making it as rock solid as possible before we can release it as the 0.12.0 version that we've all been looking forward to. There are currently 32 open issues that need to be fixed before the release. Some of them will be triaged to other milestones in

@tjfontaine
tjfontaine / t.c
Last active August 29, 2015 14:04
#include <stdio.h>
#include <unistd.h>
#include <uv.h>
static uv_timer_t timer;
long long start = 0;
static void cb(uv_timer_t* timer) {
uv_update_time(uv_default_loop());
function DgramStream(type, port) {
if (!(this instanceof DgramStream))
return new DgramStream(type, port);
ReadableStream.call(this);
this._socket = dgram.createSocket(type);
this._socket.bind(port);
this._socket.on('message', function(msg, rinfo) {
var Transform = require('stream').Transform;
var util = require('util');
function Padstream() {
if (!(this instanceof Padstream))
return new Padstream();
Padstream.call(this);
this._buffer = new Buffer(64);
global sreqs = 0
global creqs = 0
function report() {
printf("sreqs: %d -- creqs: %d\n", sreqs, creqs);
}
probe timer.s(1) {
report()
}
function Certificate(Buffer || String) {
this.issuer = '';
this.before = new Date();
this.after = new Date();
this.serial = '';
this.subject = '';
this.algorithm = '';
this.signature = new Buffer();
}
Certificate.prototype.validOn(date) { return true; }
diff --git a/src/shim.cc b/src/shim.cc
index 88f5494..a7fae99 100644
--- a/src/shim.cc
+++ b/src/shim.cc
@@ -1451,7 +1451,9 @@ shim_buffer_new_external(shim_ctx_s* ctx, char* data, size_t len,
#if NODE_VERSION_AT_LEAST(0, 11, 3)
return new shim_val_s(node::Buffer::New(data, len, cb, hint));
#else
- return new shim_val_s(SHIM__TO_LOCAL(Buffer::New(data, len, cb, hint)->handle_));
+ Buffer* buf = Buffer::New(data, len, cb, hint);