Skip to content

Instantly share code, notes, and snippets.

Ryan Stevens ryanstevens

Block or report user

Report or block ryanstevens

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View dedupe photos
var md5 = require('md5');
var fs = require('fs');
var crypto = require('crypto');
var async = require('async');
var md5File = require('md5-file');
var path = require('path');
var argv = require('yargs')
.alias('d', 'd')
.default('d', './')
.argv;
View keybase.md

Keybase proof

I hereby claim:

  • I am ryanstevens on github.
  • I am ryan_stevens (https://keybase.io/ryan_stevens) on keybase.
  • I have a public key whose fingerprint is 8F4E 20A5 2D51 C087 4BDB 8275 2245 CADE 4A68 2BAD

To claim this, I am signing this object:

View gist:8eb04268fbea267122a8
var request = require('request');
var cls = require('continuation-local-storage');
var ns = cls.createNamespace('test');
ns.run(function() {
ns.set('foo', 'bar');
setTimeout(function() {
console.log("This is fine " + ns.get('foo'));
}, 0);
View gist:f510f9355ad1bdcfd524
var microdom = require('microdom');
var createSOAPClient = require('soap').createClient;
var argv = require('optimist').argv;
var Table = require('cli-table');
// ref: http://graphical.weather.gov/xml/
createSOAPClient(
'http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl',
function clientCreated(err, client) {
View gist:7a363c09872c00e24226
### Keybase proof
I hereby claim:
* I am ryanstevens on github.
* I am ryan_stevens (https://keybase.io/ryan_stevens) on keybase.
* I have a public key whose fingerprint is 055D BFAE 3ED0 F75E EABD 7AE9 89D6 2F51 91AC 539D
To claim this, I am signing this object:
View gist:7879673
npm WARN package.json bufferpack@0.0.6 No readme data.
npm ERR! tar.unpack untar error /home/ryan/tmp/npm-17888/1386617568447-0.15539880678988993/tmp.tgz
npm ERR! tar.unpack untar error /home/ryan/tmp/npm-17888/1386617568447-0.15539880678988993/tmp.tgz
npm ERR! Error: invalid tar file
npm ERR! at Extract.Parse._startEntry (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:144:13)
npm ERR! at Extract.Parse._process (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:125:12)
npm ERR! at BlockStream.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:46:8)
npm ERR! at BlockStream.EventEmitter.emit (events.js:96:17)
npm ERR! at BlockStream._emitChunk (/usr/local/lib/node_modules/npm/node_modules/block-stream/block-stream.js:145:10)
npm ERR! at BlockStream.resume (/usr/local/lib/node_modules/npm/node_modules/block-stream/block-stream.js:58:15)
View gist:4076718
var proxyServer = httpProxy.createServer(function (req, res, proxy) {
//look for anything with "socket" in the sub-domain and route to node, otherwise route to php
var host = req.headers.host,
target = routes.getTarget([host]);
if (!target) {
logger.error("No route for " + host+", cannot serve "+req.url);
res.end();
return;
View gist:1981526
arn: Creating new snapshot for version 0.2.0-31
info: Done creating snapshot 0.2.0-31
info: Updating application rootmusic-opg-test
info: Activating snapshot 0.2.0-31 for rootmusic-opg-test
info: Stopping app rootmusic-opg-test
info: App rootmusic-opg-test is now stopped
info: Starting app rootmusic-opg-test
help:
help: Usage:
help:
View gist:1638669
var test = require('testling');
//run qunit or mocha test here
var tapOutput = qunit.getTapOutput();
test.consumeTap(tapOutput);
@ryanstevens
ryanstevens / apply arguments
Created Dec 21, 2011
This shows you can pass arguments directly into apply
View apply arguments
var test = require("testling")
test("Apply arguments", function(t) {
function fn(p1, p2) {
t.equal(p1, 10);
t.equal(p2, 20);
}
You can’t perform that action at this time.