Skip to content

Instantly share code, notes, and snippets.

View Rush's full-sized avatar
☺️
Work hard, play hard

Damian Kaczmarek Rush

☺️
Work hard, play hard
View GitHub Profile
#!/usr/bin/env node
var spdy = require('spdy'),
crypto = require('crypto'),
fs = require('fs');
b64decode = function(encoded) {
return new Buffer(encoded || '', 'base64').toString('utf8');
};
#!/usr/bin/env node
var spdy = require('spdy'),
crypto = require('crypto'),
fs = require('fs');
b64decode = function(encoded) {
return new Buffer(encoded || '', 'base64').toString('utf8');
};
#!/usr/bin/env node
var spdy = require('spdy'),
crypto = require('crypto'),
fs = require('fs');
b64decode = function(encoded) {
return new Buffer(encoded || '', 'base64').toString('utf8');
};
@Rush
Rush / node-spdy-nodejs-fail
Created December 26, 2013 12:41
Test showing problem of node-spdy with node version from 0.11.6 up to latest git Open in Chrome by https://localhost:40443/ Should print: INIT 0 1 2 3 4 5 6 7 8 9 END Prints: INIT 0
#!/usr/bin/env node
var spdy = require('spdy'),
crypto = require('crypto'),
fs = require('fs');
b64decode = function (encoded) {
return new Buffer(encoded || '', 'base64').toString('utf8');
};
var config = {
var countries = [{
"name": "Afghanistan",
"code": "AF",
"isEu": false
}, {
"name": "Albania",
"code": "AL",
"isEu": false
}, {
"name": "Algeria",
@Rush
Rush / testcase_3638
Created July 5, 2012 22:39
Testcase for Node.JS #3638
var crypto = require('crypto');
var tls = require('tls');
var net = require('net');
function starttls(socket, options, isServer, cb) {
var credentials = crypto.createCredentials(options);
var pair = tls.createSecurePair(credentials, isServer, false, !isServer);
var cleartext = pipe(pair, socket);