All Snippets (27)
6 days ago
View more (13 lines)
1
2
3
4
5
2
3
4
5
Event.observe('foo', 'click', function() { alert('you clicked me') }); // becomes $('#foo').click(function() { alert('you clicked me') });
7 days ago
View more (90 lines)
1
2
3
4
5
2
3
4
5
require 'memcached' module ActiveSupport module Cache class MemcachedStore < Store
8 days ago
View more (179 lines)
1
2
3
4
5
2
3
4
5
module Cacheable def self.included(base) #:nodoc: super base.extend ClassMethods base.extend MethodMissing
2 months ago
View more (54 lines)
1
2
3
4
5
2
3
4
5
#!/usr/bin/env ruby madlib = "Our favorite language is ((gem:a gemstone)). We think ((gem)) is better than ((a gemstone))." prompts_reg = /\(\([a-z _-]+:[a-z _-]+\)\)/ reg = /\(\([a-z :_-]+\)\)/
2 months ago
View more (8 lines)
1
2
3
4
5
2
3
4
5
# Thinking of ways to embed snippets via js. # This gem looks promising http://code.dunae.ca/premailer.web/local.html
2 months ago
View more (90 lines)
1
2
3
4
5
2
3
4
5
require 'memcached' module ActiveSupport module Cache class MemcachedStore < Store
2 months ago
View more (15 lines)
1
2
3
4
5
2
3
4
5
# Threadsafe User.current class ApplicationController < ActionController::Base before_filter :current_user_id
2 months ago
View more (8 lines)
1
2
3
4
5
2
3
4
5
# Install memcached wget http://download.tangent.org/libmemcached-0.22.tar.gz tar -xzvf libmemcached-0.22.tar.gz cd libmemcached-0.22 ./configure
