I hereby claim:
- I am stephank on github.
- I am stephank (https://keybase.io/stephank) on keybase.
- I have a public key ASBiXIU3HeuKIfnkJ6R0-ipuKBQsxn3Udvg7BMyM2e2m0go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env node | |
| 'use strict'; | |
| // The master must be reasonably stressed for the crash to appear. These | |
| // parameters can be tweaked to accomplish that. Increasing them too far can | |
| // cause backlog fill and undesirable connection resets. | |
| // | |
| // These particular values seem to work on Ubuntu 15.04 running on an EC2 | |
| // c3.large instance with official node.js 4.1.0 binaries. (Everything 64-bit) | |
| var WORKERS = 50; |
| #!/usr/bin/env node | |
| var net = require('net'); | |
| var host = process.argv[2] || '127.0.0.1'; | |
| var port = parseInt(process.argv[3], 10) || 6379; | |
| var len = parseInt(process.argv[4], 10) || 3000; | |
| var msg = | |
| '*3\r\n' + |
| // Copyright Joyent, Inc. and other Node contributors. | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a | |
| // copy of this software and associated documentation files (the | |
| // "Software"), to deal in the Software without restriction, including | |
| // without limitation the rights to use, copy, modify, merge, publish, | |
| // distribute, sublicense, and/or sell copies of the Software, and to permit | |
| // persons to whom the Software is furnished to do so, subject to the | |
| // following conditions: | |
| // |
Clients indicate support for the extension by requesting a capability server-time as per the [IRC Client Capabilities Extension][caps].
CAP REQ :server-time
After requesting the capability, clients MUST be able to parse an optional timestamp at the start of each message. The message pseudo-BNF, as defined in [RFC 1459, section 2.3.1][rfc1459] is extended to look as follows:
::= ['@' ] [':' ]
| { | |
| "target_defaults": { | |
| "product_dir": "products" | |
| } | |
| } |
| // console runnable test case adapted from: | |
| // https://github.com/stephank/node-arrays/blob/master/test/typed-array-copy.js | |
| function assertEq(desc, a, b) { console.log(desc + ": " + a + " == " + b + " ? " + (a == b)); } | |
| a = new Uint16Array(8); | |
| b = new Uint8Array(a.buffer, 0, 2); | |
| b[0] = 0x05; | |
| b[1] = 0x05; |
A Homebrew formula for installing PulseAudio on OS X.
Tested on Lion, and at the moment requires the 10.7 SDK.
brew install https://raw.github.com/gist/1633642/pulseaudio.rb
| static int EIO_AfterDrawMap(eio_req *req) { | |
| HandleScope scope; | |
| drawmap_request *drawmap_req =(drawmap_request *)req->data; | |
| ev_unref(EV_DEFAULT_UC); | |
| drawmap_req->map->Unref(); | |
| Local<Value> argv[2]; | |
| if (drawmap_req->data != NULL) { | |
| Buffer * buffer = Buffer::New(drawmap_req->data, drawmap_req->size, FreeImageBuffer, NULL); |
| (function () { | |
| var myModule = { | |
| "prop1" : "some value", | |
| "prop2" : "some other value" | |
| }; | |
| myModule.someMethod = function () { | |
| // Do stuff with props. | |
| }; |