My Recent Pastes (95 and counting)
Pastes by brough (95 and counting)
Below are the 15 most recent pasties by brough.
April 27, 2008
5:06PM EDT
by brough
View more (10 lines)
window.addEvent("domready",function(){ if($('cart')) cart_events }; function cart_events(){
April 27, 2008
3:21PM EDT
by brough
View more (81 lines)
# firefox (in dev so slow): http://bookerbee.com/bookables?page=7&&sleeps=2&when=31&where=1r ## shared/_paginate.html.haml
April 23, 2008
4:56AM EDT
by brough
View more (115 lines)
rake aborted!
PGError: ERROR: duplicate key value violates unique constraint "buzzids_pkey"
: INSERT INTO buzzids ("updated_at", "id", "assigned", "buzzid", "created_at") VALUES('2008-04-23 08:54:35.999810', 63518327, NULL, NULL, '2008-04-23 08:54:35.999810')
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:150:in `log'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:407:in `execute'
April 21, 2008
2:18PM EDT
by brough
View more (16 lines)
class Array def shuzzle providers = Provider.find(:all).map {|it| it.id} set = [] providers.each do |p|
April 02, 2008
10:30AM EDT
by brough
View more (50 lines)
require 'rubygems' require 'eventmachine' require 'hpricot' module ThirdParty
March 29, 2008
9:01AM EDT
by brough
@projects.each do |project| projects_collection[project.client_id] = {:projects => project} end
March 28, 2008
6:37PM EDT
by brough
View more (18 lines)
options[:conditions].each_pair do |key,value| if value.to_s.split('')[0] =~ /^>|^</ sql_value = value else sql_value = "= '#{value}'"
March 24, 2008
6:31PM EDT
by brough
View more (24 lines)
venues: id,remote_id,drivetime events id,venue_id
March 22, 2008
1:48PM EDT
by brough
View more (85 lines)
passing geocode class either a postcode string or an object. geocodes = Geocode.new("postcode")
March 15, 2008
2:24PM EDT
by brough
View more (159 lines)
#Problem: I'm using a form to generate a csv for booking periods, #the form is populated from the pricing table which includes booking #periods and prices -- but the table is updated via csv import, so #the users can edit prices and periods separately.
March 15, 2008
2:08AM EDT
by brough
View more (15 lines)
require 'rubygems' require 'activesupport' t = Time.now
March 07, 2008
5:04PM EDT
by brough
View more (14 lines)
json.org example string: {"nickname":null,"num":100,"balance":1000.21,"is_vip":true,"name":"foo"}
require 'yaml'
>> x = YAML::load %{{"nickname": null, "num": 100, "balance": 1000.21, "is_vip": true, "name": "foo"}}
March 06, 2008
12:13PM EDT
by brough
View more (100 lines)
map.resources :apis, :collection => {:ota => :post} class ApisController < ApplicationController
March 03, 2008
4:25PM EDT
by brough
View more (17 lines)
window.addEvent("domready", function(){ vote(); }); function vote(){
February 28, 2008
4:56AM EDT
by brough
View more (14 lines)
require 'rubygems' require 'hpricot' xml = "<item><title foo='bar'></title></item><item><title foo='hum'></title></item><item><title foo='bug'></title></item>"
