Skip to content

Instantly share code, notes, and snippets.

View lbarratt's full-sized avatar
🖖

Luke Barratt lbarratt

🖖
View GitHub Profile
@stevebourne
stevebourne / Gemfile
Created April 15, 2012 19:28
Add facebook auth to a Clearance app, using omniauth-facebook
gem 'omniauth'
gem 'omniauth-facebook'
gem 'clearance'
@samwgoldman
samwgoldman / gist:1199827
Created September 7, 2011 05:23
Create an html table with shorthand syntax
def html_table(tableish)
unless tableish.map(&:size).uniq.count == 1
raise 'Must be array of arrays of equal length'
end
table = Nokogiri::HTML::DocumentFragment.parse ''
Nokogiri::HTML::Builder.with(table) { |html|
html.table {
if tableish.first.size > 1
@kaelig
kaelig / Gemfile
Created September 7, 2011 00:20
Sass & CoffeeScript automated compiling and minifying with Guard
source "http://rubygems.org"
group :development do
gem 'rake'
gem 'guard'
gem 'coffee-script'
gem 'rb-fsevent'
gem 'rb-inotify'
gem 'compass', '0.11.5'
gem 'sass', '3.1.5'
gem 'guard-compass'
@rcmachado
rcmachado / jquery.unserialize.js
Created November 25, 2009 10:19
$.unserialize for jQuery
/**
* $.unserialize
*
* Takes a string in format "param1=value1&param2=value2" and returns an object { param1: 'value1', param2: 'value2' }. If the "param1" ends with "[]" the param is treated as an array.
*
* Example:
*
* Input: param1=value1&param2=value2
* Return: { param1 : value1, param2: value2 }
*