Skip to content

Instantly share code, notes, and snippets.

View jdub's full-sized avatar

Jeff Waugh jdub

View GitHub Profile
@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",
@jdub
jdub / vocore-openwrt-systemd.log
Created February 23, 2015 13:25
openwrt-systemd boot log and chart
-- Logs begin at Thu 1970-01-01 00:00:12 UTC, end at Mon 2015-02-16 21:05:42 UTC. --
Jan 01 00:00:12 openwrt systemd-journal[268]: Runtime journal is using 4.0M (max allowed 8.0M, trying to leave 2.1M free of 10.2M available → current limit 8.0M).
Jan 01 00:00:12 openwrt systemd-journal[268]: Runtime journal is using 4.0M (max allowed 8.0M, trying to leave 2.1M free of 10.2M available → current limit 8.0M).
Jan 01 00:00:12 openwrt kernel: Linux version 3.14.32 (jdub@ubuntu) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r44482) ) #39 Thu Feb 19 21:34:36 AEDT 2015
Jan 01 00:00:12 openwrt kernel: SoC Type: Ralink RT5350 id:1 rev:3
Jan 01 00:00:12 openwrt kernel: bootconsole [early0] enabled
Jan 01 00:00:12 openwrt kernel: CPU0 revision is: 0001964c (MIPS 24KEc)
Jan 01 00:00:12 openwrt kernel: MIPS: machine is VoCore
Jan 01 00:00:12 openwrt kernel: Determined physical RAM map:
Jan 01 00:00:12 openwrt kernel: memory: 02000000 @ 00000000 (usable)
@jdub
jdub / 01) Notes
Last active August 29, 2015 14:15
hhvm vs. php5-fpm
(YES, THIS IS GOOFY AND NAIVE AND SO ON.)
Software:
- Ubuntu 14.04.2 LTS
- nginx 1.4.6
- hhvm 2.5.1
- php5-fpm 5.5.9 (pm.max_children = 30)
- WordPress 4.4.1 (fresh install, so very little data)
Hardware:
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 ],