Skip to content

Instantly share code, notes, and snippets.

View anujluthra's full-sized avatar

Anuj Luthra anujluthra

View GitHub Profile
# error occurs when same lexical method (which calls super)
# is defined on the singleton class of two or more objects of different classes,
# and then that method is called on any of the objects
# other than the last one the method was defined on...
def x(obj)
# uncomment eval and it works
# eval "
class << obj
def to_s
@anujluthra
anujluthra / backend.js
Created July 24, 2012 04:46 — forked from apeckham/backend.js
simple statsd backend that prints json to /var/log/statsd.log
exports.init = function(startup_time, config, events) {
events.on('flush', function(timestamp, metrics) {
console.log(JSON.stringify(timestamp));
console.log(JSON.stringify(metrics));
});
return true;
};