Here is what continuation-local-storage
is expecting from async-listener:
(scenario: three asynchronous / calls in a single continuation chain)
create[1]
|
|
before[1]
| create[2]
after[1] |
Here is what continuation-local-storage
is expecting from async-listener:
(scenario: three asynchronous / calls in a single continuation chain)
create[1]
|
|
before[1]
| create[2]
after[1] |
var time = +Date.now() | |
var testId = 0 | |
console.log('TAP version 13') | |
tape.createStream({ objectMode: true }).on('data', function (row) { | |
if (row.type === 'test') { | |
console.log('# ' + row.name) | |
} | |
if (row.type === 'assert') { | |
testId++ |
; CouchDB Config | |
; Drop in PREFIX/local.d/npmjs.ini | |
[couch_httpd_auth] | |
public_fields = appdotnet, avatar, avatarMedium, avatarLarge, date, email, fields, freenode, fullname, github, homepage, name, roles, twitter, type, _id, _rev | |
users_db_public = true | |
[httpd] | |
secure_rewrites = false |
Testing out fedor's SSL enhancements. You don't notice the difference... At first!
Once you adjust ciphers to disable ECDH, then you get the nice surprise.
Running an http server that acts as a proxy to an SSL server, all running on localhost
.
var http = require('http'); | |
var send = require('send'); | |
var urlParse = require('url').parse; | |
var count = 2; | |
var server = http.createServer(function (req, res) { | |
if (!--count) server.close(); // Only allow two connection and then exit. | |
send(req, urlParse(req.url).pathname) | |
.root(__dirname) | |
.pipe(res); |
Math.TAU = Math.PI + Math.PI; | |
const TO_DEGREES = 180 / Math.PI; | |
const TO_RADIANS = Math.PI / 180; | |
function headingFromDelta(x, y) { | |
var a = Math.atan2(y, x); | |
if(a < 0) a = (a + Math.PI) + Math.PI; | |
// janky rotation by 90deg | |
a = Math.round(a * TO_DEGREES); |
This section describes the conventions used here to describe type signatures.
A [T]
is an array-like value (only ever used read-only in this API), i.e., one with an integer length
and whose indexed properties from 0 to length - 1
are of type T
.
A type T?
should be read as T | undefined
-- that is, an optional value that may be undefined
.
# Total the billable amount in Manta | |
mbillable() { | |
mget -q ~~/reports/usage/storage/latest |\ | |
json storage.public.bytes storage.stor.bytes |\ | |
awk ' | |
{ | |
s += $1; | |
} | |
END { | |
billable = (s / 1024 / 1024 / 1024) + 1; |
#!/usr/bin/env node | |
var restify = require('restify'); | |
var path = require('path'); | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var manta = require('manta'); | |
var client = manta.createClient({ | |
sign: manta.privateKeySigner({ |