Skip to content

Instantly share code, notes, and snippets.

@jamiehodge
jamiehodge / Gemfile
Created January 15, 2012 22:37
Spine.js contacts demo Sinatra backend
source 'https://rubygems.org'
gem 'sinatra', git: 'git://github.com/sinatra/sinatra.git'
gem 'sequel'
gem 'sqlite3'
gem 'yajl-ruby', require: 'yajl'
@stympy
stympy / excerpt.rb
Created May 23, 2011 13:14
Jekyll excerpt plugin
# This goes in _plugins/excerpt.rb
module Jekyll
class Post
alias_method :original_to_liquid, :to_liquid
def to_liquid
original_to_liquid.deep_merge({
'excerpt' => content.match('<!--more-->') ? content.split('<!--more-->').first : nil
})
end
end
@danott
danott / entities.css
Created January 31, 2011 22:07
Use CSS's :after pseudo-selector to insert hexadecimal values of html entities into the document. Less markup. More awesome.
/* Daniel Ott
* entities.css
* 31 January 2011
*
* Adding arrows to thinks makes them more clickable. Right?
* Use CSS's :after pseudo-selector to insert hexadecimal values
* of html entities into the document. Less markup. More awesome.
*/
.add-an-arrow:after {
// HOWTO: load LABjs itself dynamically!
// inline this code in your page to load LABjs itself dynamically, if you're so inclined.
(function (global, oDOC, handler) {
var head = oDOC.head || oDOC.getElementsByTagName("head");
function LABjsLoaded() {
// do cool stuff with $LAB here
}