Skip to content

Instantly share code, notes, and snippets.

@yonkeltron
yonkeltron / README.md
Created May 8, 2013 13:16
A proof-of-concept parser for Heroku's Postgres metrics logs written in Ruby using the Parslet gem.

Backstory

While tailing the logs for a Rails app running on Heroku, I noticed some funky entries which showed up. While these frightened me at first, some fine Herokoid data engineers assured me that my PostgreSQL database hadn't suffered trauma but was showing off the Heroku Postgres metrics logs feature.

To aid in the digestion of this neato data, I've taken the liberty of

@yonkeltron
yonkeltron / actor.js
Created December 17, 2010 14:57
Actor-like lib for objects in node.js
var _ = require('underscore')._,
events = require('events');
var Actor = function Actor(object) {
var postman = new events.EventEmitter(),
mailbox = [],
that = this,
monitor = function monitor() {
var data = mailbox.shift();
if (data) {
def make_camel_case(underscored_text)
out_string = ''
underscored_text.split('_').each_with_index {|w, i| i > 0 ? out_string << w.capitalize : out_string << w }
out_string
end