Skip to content

Instantly share code, notes, and snippets.

View rkbodenner's full-sized avatar

Ralph Bodenner rkbodenner

View GitHub Profile
@rkbodenner
rkbodenner / request_start_variable.patch
Created March 1, 2010 19:08
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.
--- 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
rkbodenner / gist:416eee24b5fa513e3d6fa9e5574ca7c3
Created December 13, 2016 22:05
Portland Residential Infill Project amended and approved, Dec. 7, 2016
Residential Infill Project E-UPDATE, December 13, 2016
We are sending this e-update as a courtesy to anyone who has provided us with an e-mail address when they signed up for the project mailing list. Project staff will continue to send e-updates periodically throughout the planning process. We hope this will be an easy way to keep you informed and provide you with a convenient way to pass on information about the project to others who may be interested.
What is this project about?
In response to community concerns about demolitions and the scale of new homes, as well as the supply of housing in Portland, the Residential Infill Project is exploring ways to adapt Portland’s single-dwelling zoning rules to meet the needs of current and future generations. The project addresses three topic areas: scale of houses, housing choice, and narrow lot development. For more information visit the project website at: www.portlandoregon.gov/bps/infill
With some fine-tuning, City Council approves Residential Infill Pro
@rkbodenner
rkbodenner / main.go
Created June 23, 2016 05:18
Scrape game information from GPSD site
package main
import (
"fmt"
"strings"
"github.com/PuerkitoBio/goquery"
)
func main() {
doc, _ := goquery.NewDocument("http://www.gpsdsoccer.com/teams/81495074/57845445-81495140/TEAM.html")
@rkbodenner
rkbodenner / conf-votes.sh
Created May 17, 2016 23:37
Count votes submitted via a Google Forms multiple-checkbox field
tail -n 131 ballot.csv | sed -e s/\"[^\"]*\"\,//g | sed -e s/\"//g | tr ';' \\n | sort | uniq -c | sort > ballot-counts.txt
@rkbodenner
rkbodenner / gist:5706847
Created June 4, 2013 15:32
Rust type mismatch compile error
[rust] whsky:ralph-libuv-tasks  rust run server.rs
server.rs:19:16: 19:21 error: mismatched types: expected `&mut ~[<V37>]` but found `~[u8]` (expected &-ptr but found vector)
server.rs:19 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/diagnostic.rs:99
rust: task failed at 'explicit failure', /Users/ralph/_code/rust-0.6/src/librustc/rustc.rc:357
rust: domain main @0x7fb88200c210 root task failed
@rkbodenner
rkbodenner / gist:5633156
Created May 23, 2013 06:47
Steam API notes
http://steamcommunity.com/dev
https://developer.valvesoftware.com/wiki/Steam_Web_API#GetGlobalAchievementPercentagesForApp_.28v0001.29
http://koraktor.de/steam-condenser/
https://github.com/koraktor/steam-condenser-ruby
@rkbodenner
rkbodenner / pre-commit.sh
Created September 11, 2012 16:41 — forked from intjonathan/pre-commit.sh
pre-commit hook (add to .git/hooks/pre-commit) to refuse to commit debugger strings
#!/bin/sh
# 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" != "" ]
then
for f in $files
do
@rkbodenner
rkbodenner / hack.sh
Created April 7, 2012 03:51 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
#
# install it:
# curl -sL https://raw.github.com/gist/2324912/hack.sh | sh
#
echo "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)"
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
@rkbodenner
rkbodenner / .irbrc
Created March 26, 2012 23:18
Use ~/.irbrc to load Rails-specific code in your script/console
load File.dirname(__FILE__) + '/.railsrc' if $0 == 'irb' && ENV['RAILS_ENV']
@rkbodenner
rkbodenner / full.plugin.list.txt
Created February 23, 2012 17:56 — forked from briandoll/full.plugin.list.txt
Full Plugin List Deployed in applications monitored by New Relic, September 2011
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