Skip to content

Instantly share code, notes, and snippets.

# http://gist.github.com/413042
# Readily available HAML variant
# stolen from http://github.com/cschneid/irclogger/blob/master/lib/partials.rb
# and made a lot more robust by me
# this implementation uses haml by default. if you want to use any other template mechanism
# then replace `haml` on line 13 and line 17 with `erb` or whatever
module Sinatra::Partials
def partial(template, *args)
template_array = template.to_s.split('/')
template = template_array[0..-2].join('/') + "/_#{template_array[-1]}"
require 'rubygems'
require 'exceptional'
require 'sinatra'
Exceptional.api_key = "...your api key..."
module Exceptional
def self.handle_sinatra(exception, uri, request, params)
e = Exceptional.parse(exception)
@adhusson
adhusson / .vimrc
Created May 6, 2011 11:07 — forked from jeresig/.vimrc
VIM Config
au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery
set nocompatible
set autoindent
set tabstop=2
set showmatch
set vb t_vb=
set ruler
set nohls
set incsearch
syntax on