Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
# | |
# by Eric Lindvall <[email protected]> | |
# | |
class LruGenerationalHash | |
attr_reader :max_size | |
def initialize(max_size, generations = 2) | |
@generations = generations.times.collect { Hash.new } | |
@max_size = max_size |
require 'sinatra' | |
require 'redis' | |
require 'json' | |
require 'date' | |
class String | |
def &(str) | |
result = '' | |
result.force_encoding("BINARY") |
require 'integration_helper' | |
require 'rack' | |
require 'rack/handler/webrick' | |
describe HttpClient do | |
before :all do | |
@server = WEBrick::HTTPServer.new( | |
:Port => 9293, | |
:Logger => Rails.logger, | |
:AccessLog => Rails.logger |
#!/usr/bin/env ruby | |
# Provide data over STDIN to Instrumental | |
# Format of data: | |
# <metric name> <value> <unix timestamp> | |
# or | |
# <metric name> <value> | |
# | |
# Second form will assume that the time the | |
# metric is reported is when the event occurred. | |
# |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf
using homebrew.
node_modules |
require 'rbczmq' | |
require 'fileutils' | |
require 'celluloid' | |
class Heartbeat | |
include Celluloid | |
def self.start(id = nil, options = nil) | |
new(ZMQ::Context.new, id, options) | |
end |