View gist:3824222
Installing hitimes (1.1.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
creating Makefile
xcrun cc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -DUSE_INSTANT_OSX=1 -Wall -c hitimes_ext.c
xcrun cc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -DUSE_INSTANT_OSX=1 -Wall -c hiti
View broadcast_trigger.rb
module Zookeeper
class BroadcastTrigger
def initialize(zk, path)
@zk = zk
@path = path
def trigger
@zk.set(@path, "#{$$}")
rescue ZK::Exceptions::NoNode
View remote_syslog.god do |w| = 'remote_syslog'
w.interval = 7.seconds
w.log = File.join(RAILS_ROOT, 'log', "#{}-god.log")
w.dir = RAILS_ROOT
w.start = "bundle exec remote_syslog --tls -D -c #{RAILS_ROOT}/config/remote_syslog.yml"
View redis_failover.rake
namespace :redis_failover do
task :monitor_client do
require 'redis_failover'
zookeepers = ENV['ZOOKEEPERS']
if !zookeepers && zookeepers_file = ENV['ZOOKEEPERS_FILE']
if File.exists?(zookeepers_file)
zookeepers =
View librato_metric.rb
require 'lazy'
require 'system_timer'
class LibratoMetric
COUNT = 10
def initialize(metric_name, timeout = 4)
@metric_name = metric_name
@timeout = timeout
View jobs.rb
#!/usr/bin/env ruby
# encoding: utf-8
# setup
require 'fileutils'
script = File.expand_path(__FILE__).gsub(%r|\breleases/\d+\b|, 'current')
script_dir = File.dirname(script)
rails_root = File.dirname(script_dir)
View boundary_client.rb
# Simple Boundary client
class BoundaryClient
def initialize(orgid, apikey)
@orgid = orgid
@apikey = apikey
View cubism.papertrail.js
* Cubism source for Papertrail
cubism.context.prototype.papertrail = function(token) {
var source = {};
source.metric = function(expression, title) {
var lookup = {};
View _deploy.rb
# load plugin
load 'boundary'
# Notify boundary with your orgid, apikey
boundary.register 'cdd7261592bca18539eae9bb5f1bcfdd', 'f9e6282c4727c5733585a4be86e0f990'
View crash_a_187.rb
require 'thread'
# This seems to crash 1.8.7
10.times { { } }
Process.waitpid fork { GC.start; puts "In child: #{$$}" }