Skip to content

Instantly share code, notes, and snippets.


Ralph Bodenner rkbodenner

View GitHub Profile
View maze.rb
# Not efficient, but fairly readable.
# Author:
class Maze
class Node
attr_reader :x, :y, :distance
attr_accessor :neighbors
def initialize(x, y)
rkbodenner / request_start_variable.patch
Created Mar 1, 2010
Add a 'start_time' variable to nginx 0.8.33 to support an X-REQUEST-START header. This header is used by New Relic RPM to record queue time.
View request_start_variable.patch
--- src/http/ngx_http_variables.c.orig 2010-01-11 03:21:46.000000000 -0800
+++ src/http/ngx_http_variables.c 2010-02-18 10:01:32.000000000 -0800
@@ -93,6 +93,9 @@
static ngx_int_t ngx_http_variable_pid(ngx_http_request_t *r,
ngx_http_variable_value_t *v, uintptr_t data);
+static ngx_int_t ngx_http_variable_start_time(ngx_http_request_t *r,
+ ngx_http_variable_value_t *v, uintptr_t data);
rkbodenner / gist:741230
Created Dec 14, 2010
Helpful SVN shell functions
View gist:741230
### SVN commands
# Run these in the tag/branch working copy root.
# The svn_merge* functions depend on having 'trunk' and '<tag name>' working copies in the same directory.
# Print changelog since the last tag was cut
function tag_patches()
if expr `pwd` : '.*/m[0-9][0-9]-[0-9][0-9]-[0-9][0-9]$' > /dev/null; then
rkbodenner / gist:1405704
Created Nov 29, 2011
Go to Zendesk ticket from JIRA issue: A bookmarklet
View gist:1405704
// Opens a new tab that loads the Zendesk ticket referred to by the JIRA issue you're looking at.
// Specific to New Relic--that DOM ID is for our custom ZendeskID field in JIRA.
rkbodenner / full.plugin.list.txt
Created Feb 23, 2012 — forked from briandoll/full.plugin.list.txt
Full Plugin List Deployed in applications monitored by New Relic, September 2011
View full.plugin.list.txt
Full Plugin List Deployed in Rails applications monitored by New Relic, September 2011
Count Plugin Name
2040 rpm
1534 newrelic_rpm
1268 acts_as_list
1186 paperclip
1130 will_paginate
1068 exception_notification
rkbodenner / .irbrc
Created Mar 26, 2012
Use ~/.irbrc to load Rails-specific code in your script/console
View .irbrc
load File.dirname(__FILE__) + '/.railsrc' if $0 == 'irb' && ENV['RAILS_ENV']
rkbodenner /
Created Apr 7, 2012 — forked from erikh/
OSX For Hackers
#!/usr/bin/env sh
# install it:
# curl -sL | sh
echo "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)"
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
rkbodenner /
Created Sep 11, 2012 — forked from intjonathan/
pre-commit hook (add to .git/hooks/pre-commit) to refuse to commit debugger strings
# Refuse to commit files with the string NOCOMMIT, debugger, or merge markers present.
files=$(git diff-index --name-status --cached HEAD | grep -v ^D | cut -c3-)
if [ "$files" != "" ]
for f in $files
View gist:5633156
rkbodenner / gist:5706847
Created Jun 4, 2013
Rust type mismatch compile error
View gist:5706847
[rust] whsky:ralph-libuv-tasks  rust run 19:21 error: mismatched types: expected `&mut ~[<V37>]` but found `~[u8]` (expected &-ptr but found vector) vec::push(bytes, byte as u8);
error: aborting due to previous error
rust: task failed at 'explicit failure', /Users/ralph/_code/rust-0.6/src/libsyntax/
rust: task failed at 'explicit failure', /Users/ralph/_code/rust-0.6/src/librustc/rustc.rc:357
rust: domain main @0x7fb88200c210 root task failed
You can’t perform that action at this time.