Skip to content

Instantly share code, notes, and snippets.

View jdub's full-sized avatar

Jeff Waugh jdub

View GitHub Profile
ERROR: null
RESPONSE: { socket:
{ pair:
{ _secureEstablished: true,
_isServer: false,
_encWriteState: true,
_clearWriteState: true,
_doneFlag: false,
credentials: [Object],
_rejectUnauthorized: false,
@jdub
jdub / glxinfo-l.txt
Created May 24, 2011 11:54
glxinfo -l (IBM T42)
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer,
GLX_OML_swap_method, GLX_SGI_make_current_read, GLX_SGI_swap_control,
GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
@jdub
jdub / gist:824435
Created February 13, 2011 04:19
node-twitter sitestreams, http vs. https
var twitter = new require('twitter')({
consumer_key: 'XXX',
consumer_secret: 'XXX',
access_token_key: 'XXX',
access_token_secret: 'XXX',
// sitestreams
site_stream_base: 'https://betastream.twitter.com/2b'
}),
params = {
follow: [ 4690301, 15352541 ],
var http = require('http'), cons = 0;
http.createServer(function(req, res) {
var mycon = ++cons;
res.writeHead(200,
{'Content-Type': 'text/plain'});
res.write('Hello... ');
setTimeout(function() {
res.end('world! #' + mycon + '\n');
}, 2000);
}).listen(8000);
var http = require('http');
http.createServer(function(req, res) {
res.writeHead(200,
{'Content-Type': 'text/plain'});
res.end('Hello world!\n');
}).listen(8000);
/home/jdub/.node_libraries/.npm/creationix/0.0.5/package/static.js:79
stream.once('data', function (chunk) {
^
TypeError: Object [object Object] has no method 'once'
at onStat (/home/jdub/.node_libraries/.npm/creationix/0.0.5/package/static.js:79:14)
at node.js:773:9
/*
* CONNECT/STACK STYLE TWITTER "O"AUTHENTICATION MIDDLEWARE
*/
// FIXME: options should include cookie lifetime
Twitter.prototype.auth = function(mount) {
var self = this,
cookie = require('cookie'),
url = require('url'),
mount = mount || '/twauth';
function JSONRPC(options) {
if (!(this instanceof JSONRPC)) return new JSONRPC(options);
this.socket = options.socket || null;
this.fallback = options.fallback || null;
this.callbacks = {};
}
// FIXME: check for unloved callbacks at a user-defined interval