Skip to content

Instantly share code, notes, and snippets.

View othiym23's full-sized avatar
💭
what is this thing you call, "architecture"

零Rei othiym23

💭
what is this thing you call, "architecture"
View GitHub Profile
HTTP: outgoing message end.
sending 104857600
HTTP: AGENT incoming response!
HTTP: AGENT isHeadResponse false
200
{"date":"Fri, 04 Oct 2013 01:12:40 GMT","connection":"keep-alive","transfer-encoding":"chunked"}
chunk received: 65527 (total 65527)
chunk received: 65536 (total 131063)
chunk received: 65536 (total 196599)
chunk received: 65536 (total 262135)
@othiym23
othiym23 / _notes.md
Last active December 27, 2015 08:18 — forked from dazld/_notes.md

The script populates a few keys in redis (assuming it is running), and once that is complete, calls a series of tests trying to get them.

Each test stores a key in cls, and compares the key it is given when calling the get function with the one in CLS, before and after invoking GET on the redis client, failing if they are not the same.

Ther are two versions of the get function

  • Straight up callback
  • Promise based with Q

Regardless of whether hiredis is present in the project, am getting errors as follows.

function task1(){
// some logic
}
function task2(){
task1();
// other logic
}
gulp.task('task1', task1);
@othiym23
othiym23 / cls.js
Last active August 29, 2015 13:57 — forked from hayes/cls.js
var cls = require('continuation-local-storage')
, concat = require('concat-stream')
, http = require('http')
var foo = cls.createNamespace('foo')
foo.run(function () {
http.createServer(function(req, res) {
req.pipe(concat(done))