Skip to content

Instantly share code, notes, and snippets.

@GregMefford
GregMefford / clock.rb
Created April 18, 2012 01:20 — forked from paulv/clock.rb
Berlin Clock Kata
# Paul Visscher and Greg Mefford
require 'time'
class BerlinClock
def self.convert_time(time)
t = Time.parse(time)
clock = ""
if t.sec % 2 == 0
# Packaging ruby with fpm is a bit meta
# You need ruby install to use fpm
# I used an RVM install on a VM install fpm in a packaging gemset
# Install EPEL if you don't have it already
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
# Install deps for ruby build
yum install rpm-build readline-devel.x86_64 libffi-devel.x86_64 libyaml-devel.x86_64 zlib-devel.x86_64 openssl-devel.x86_64
@GregMefford
GregMefford / setup-statsd-centos.sh
Last active April 10, 2022 15:31 — forked from collegeman/setup-statsd.sh
Install Graphite and StatsD on CentOS (updated for 6.4 x86_64)
# First do a fresh install of CentOS 5.7 i386, server configuration (no GUI)
# This should be performed as root since it's going to be installing a bunch of stuff
# --- Update things to make sure we have the latest patches ---
# Add EPEL so we can get reasonably recent packages
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# --- Install all the packages --- #
yum -y install python-whisper python-carbon graphite-web python-memcached python-ldap httpd memcached