Skip to content

Instantly share code, notes, and snippets.

View jdub's full-sized avatar

Jeff Waugh jdub

View GitHub Profile
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
/*
* 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';
/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
var http = require('http');
http.createServer(function(req, res) {
res.writeHead(200,
{'Content-Type': 'text/plain'});
res.end('Hello world!\n');
}).listen(8000);
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);
@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 ],
@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,
ERROR: null
RESPONSE: { socket:
{ pair:
{ _secureEstablished: true,
_isServer: false,
_encWriteState: true,
_clearWriteState: true,
_doneFlag: false,
credentials: [Object],
_rejectUnauthorized: false,
@jdub
jdub / systemd.log
Created February 16, 2015 07:27
OpenWrt + systemd on VoCore
U-Boot for VoCore(based on RT5350)Warning: un-recognized chip ID, please update bootloader!
.
Version: May 30 2014 20:52:36
Press 'x' to console...
Booting image at bc050000 .
Image Name: MIPS OpenWrt Linux-3.14.32
Created: 2015-02-16 6:24:28 UTC
--- linux-3.18.7.orig/arch/mips/bcm63xx/boards/board_bcm963xx.c 2015-02-11 18:01:12.000000000 +1100
+++ linux-3.18.7/arch/mips/bcm63xx/boards/board_bcm963xx.c 2015-02-22 00:00:44.064301765 +1100
@@ -115,6 +115,48 @@
},
},
};
+
+static struct board_info __initdata board_963281tavng = {
+ .name = "963281tavng",
+ .expected_cpu_id = "0x6328",