Skip to content

Instantly share code, notes, and snippets.

Richard Rodger rjrodger

Block or report user

Report or block rjrodger

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
rjrodger / gist:c3717b2b21a8339a47de
Last active Aug 29, 2015
outline of loadbalance transport
View gist:c3717b2b21a8339a47de
module.exports = function( options ) {
var seneca = this
var plugin = 'loadbalance-transport'
var so = seneca.options()
options = seneca.util.deepextend(
loadbalance: {
workers: [ ... ]
rjrodger / nginx.conf
Created Sep 30, 2010
nginx alias for PhoneGap www folder
View nginx.conf
server {
location /myapp/ {
alias /Users/richard/Projects/MyApp/www/;
rjrodger / iphone.html
Created Sep 30, 2010
iPhone Mobile Safari full screen meta tags
View iphone.html
<meta name="viewport" content="user-scalable=no,initial-scale=1.0,maximum-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
rjrodger / line1030-http.js
Created Feb 8, 2011
possible fix for issue with new Agent code in http.js where Agent in an error state stop working
View line1030-http.js
socket.on('error', function(err) {
debug('AGENT SOCKET ERROR: ' + err.message);
var req;
if (socket._httpMessage) {
req = socket._httpMessage;
} else if (self.queue.length) {
req = self.queue.shift();
assert(req._queue === self.queue);
req._queue = null;
} else {
rjrodger / streambuffer.js
Created Mar 28, 2011
A utility object that caches inbound HTTP data, allow you to attach your event handlers after you make other asynchronous requests.
View streambuffer.js
function StreamBuffer(req) {
var self = this
var buffer = []
var ended = false
var ondata = null
var onend = null
self.ondata = function(f) {
for(var i = 0; i < buffer.length; i++ ) {
rjrodger / augment.css
Created May 26, 2011
Phonegap 3D compass
View augment.css
#main {
margin: 0px;
width: 480px;
height: 300px;
rjrodger / nodejs-event-stacktrace.js
Created Jun 7, 2012
better node.js stacktraces from event triggered code
View nodejs-event-stacktrace.js
// the stack trace you really want that tells you how you originally got to the fs.readFile call
var stacktrace = new Error()
fs.readFile( path, encoding, function(err,data) {
if( err ) {
var stackerr = new Error('Unable to read file: '+path+' (error code: '+err.code+')')
stackerr.errno = err.errno
stackerr.code = err.code
rjrodger / proporder.js
Created Aug 7, 2012
Workaround for property order inconsistency in Chrome V8.
View proporder.js
Workaround for property order inconsistency in Chrome V8.
Although unspecified by ECMA, most JavaScript engines return
properties in insertion order when you use to iterate through
For example:
rjrodger / comedy.txt
Created Oct 1, 2012
some cool comedians and shows to checkout
View comedy.txtÓ_Briain
View ey-rr01-c-webuse
members: { alias:'player/members/:team', GET: setcontext },
You can’t perform that action at this time.