Skip to content

Instantly share code, notes, and snippets.

View sax's full-sized avatar

Eric Saxby sax

View GitHub Profile
#!/bin/bash
# Simple Ad Hoc Carbon Cache Service
#
# put in /opt/custom/share/svc/carbon-cache.sh
set -o xtrace
. /lib/svc/share/smf_include.sh
cd /
PATH=/usr/sbin:/usr/bin:/opt/custom/bin:/opt/custom/sbin; export PATH
@sax
sax / partials.rb
Created April 6, 2010 16:38 — forked from lenary/partials.rb
partials for sinatra
# stolen from http://github.com/cschneid/irclogger/blob/master/lib/partials.rb
# and made a lot more robust by me
# this implementation uses erb by default. if you want to use any other template mechanism
# then replace `erb` on line 13 and line 17 with `haml` or whatever
require 'sinatra/base'
module Sinatra
module Partials
def partial(template, *args)