My Recent Pastes (6 and counting)

Pastes by Ben Schwarz (6 and counting)

Below are the 6 most recent pasties by Ben Schwarz.

January 21, 2008
12:30AM EDT
by Ben Schwarz

var Interface = {
        init: function () {
                site_structure.init();
        },
        

January 18, 2008
8:17AM EDT
by Ben Schwarz

  # Match the subdomain to the useraccount
  r.match(:username => /^\w+\b/) do |user|
    user.match("/:permalink").to(:controller => 'projects', :action => 'show')
  end

January 18, 2008
6:42AM EDT
by Ben Schwarz

Homeslice:openuri_memcached ben$ sudo rake deploy VERSION=0.0.3 --trace >> out
./config/../lib/openuri_memcached/version.rb:4: warning: already initialized constant MAJOR
./config/../lib/openuri_memcached/version.rb:5: warning: already initialized constant MINOR
./config/../lib/openuri_memcached/version.rb:6: warning: already initialized constant TINY
./config/../lib/openuri_memcached/version.rb:8: warning: already initialized constant STRING

December 06, 2007
5:29PM EDT
by Ben Schwarz

# Kuler, daily
# Parse daily colour from .adobe.com

# Author: Ben Schwarz
# Thanks: Marcus Crafter, Regex fun

September 13, 2007
8:20PM EDT
by Ben Schwarz

def opts_to_hash(opts_string)
  opts_hash = {}
  arr = opts_string.split(';;')
  arr.each do |option|
    option = option.split("=")

July 23, 2007
1:28AM EDT
by Ben Schwarz

class IndexesToTaggingsAndGroupings < ActiveRecord::Migration
  def self.up
     add_index :taggings, [:taggable_id, :taggable_type]
     add_index :groupings, :asset_id
  end