Skip to content

Instantly share code, notes, and snippets.

Charlie McConnell AvianFlu

  • Boxed
  • New York, NY
Block or report user

Report or block AvianFlu

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
@AvianFlu
AvianFlu / gist:992044
Created May 25, 2011
First Batch of rate data from #Node.js. Yes, I was a noob and put /n on the first two lines instead of \n.
View gist:992044
Started: 25 13:29/nStopped: 25 14:29/nMinute: 0 Messages: 2
Minute: 1 Messages: 4
Minute: 2 Messages: 3
Minute: 3 Messages: 4
Minute: 4 Messages: 2
Minute: 5 Messages: 2
Minute: 6 Messages: 1
Minute: 7 Messages: 0
Minute: 8 Messages: 0
Minute: 9 Messages: 0
@AvianFlu
AvianFlu / gist:992209
Created May 25, 2011
81 minutes of #Node.js messages per minute
View gist:992209
Started: 25 14:36
Stopped: 25 15:57
Minute: 0 Messages: 9
Minute: 1 Messages: 9
Minute: 2 Messages: 19
Minute: 3 Messages: 16
Minute: 4 Messages: 10
Minute: 5 Messages: 5
Minute: 6 Messages: 0
Minute: 7 Messages: 0
View gist:1124283
function AuthFailed(msg){
this.name = 'AuthFailed';
this.message = msg;
Error.call(this, msg);
Error.captureStackTrace(this, arguments.callee);
}
AuthFailed.prototype.__proto__ = Error.prototype;
var err = new AuthFailed('test error');
@AvianFlu
AvianFlu / gist:1126545
Created Aug 4, 2011
NPM error, two installs stopped simultaneously with the same error
View gist:1126545
ERR! SyntaxError: Unexpected token ILLEGAL
ERR! Internal routing error
ERR!
ERR! Sorry, we cannot connect to the intended server.
ERR!
ERR! We have just been notified of this problem. We will correct it as soon as possible.
ERR!
ERR! Feel free to contact us if you have any questions: support@iriscouch.com
ERR! at Object.parse (native)
ERR! at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/npm-registry-client/request.js:163:25)
@AvianFlu
AvianFlu / gist:1131154
Created Aug 8, 2011
How to not nest your callbacks.
View gist:1131154
var fs = require('fs'),
total = '';
function readAndConcat(files) {
files.forEach(gotFile);
}
function gotFile(file) {
fs.readFile(file, useData);
}
@AvianFlu
AvianFlu / gist:1138356
Created Aug 10, 2011
Am I still seeing the same old bug? Jitsu v0.4.0 via Morbo just now
View gist:1138356
info: Executing command deploy
info: Authenticated as aviantestertwo
info: Analyzing your application dependencies in server.js
warn: No application exists for space-tweet
info: Analyzing your application dependencies in server.js
View gist:1139004
var Thing = module.exports = function (options) {
for (var o in options) {
this[o] = options[o];
}
}
Thing.prototype.method = function (arg) {
var self = this;
@AvianFlu
AvianFlu / gist:1142699
Created Aug 12, 2011
A routing table and a forward in the same proxy setup
View gist:1142699
var http = require('http'),
httpProxy = require('http-proxy');
httpProxy.createServer(function (req, res, proxy) {
var options = {};
if (req.headers.host === 'google.myserver.com') {
req.headers.host = 'google.com';
options.host = 'google.com';
options.port = 80;
console.log(req.headers);
@AvianFlu
AvianFlu / bnc.js
Created Aug 14, 2011
The littlest BNC that could
View bnc.js
//
// The best BNC ever, (c) 2011 AvianFlu
// Released under MIT License
//
var net = require('net');
var bncServer = net.createServer(onConnect);
bncServer.listen(6969, process.argv[2] || 'localhost');
@AvianFlu
AvianFlu / irc-config.json
Created Aug 30, 2011
Sample kohai configs
View irc-config.json
{
"server": "irc.freenode.net",
"nick": "awesomebot",
"password": "",
"channels": ["#nodetestsu", "#nodebombrange", "#kohai"],
"showErrors": "true",
"userName": "hookio",
"realName": "Hook.io IRC Client",
"promptMsg": "Hook.io-IRC",
"promptDelim": ">",
You can’t perform that action at this time.