My Recent Pastes (95 and counting)
Pastes by brough (95 and counting)
Below are the 15 most recent pasties by brough.
February 27, 2008
12:34AM EDT
by brough
View all 30 lines
require 'rexml/document' include REXML def index @products = Product.find(:all, :limit => 10)
February 27, 2008
12:18AM EDT
by brough
View all 21 lines
<products> <product id="1" created_at="datetime" updated_at="datetime"> <descriptions> <description>test</description> <names latin_name="" name="Test Product"/>
February 24, 2008
3:38PM EDT
by brough
View all 16 lines
require 'rubygems' require 'fastercsv' #table.csv: #foo,bar,ABC/123-456
February 23, 2008
8:36PM EDT
by brough
View all 31 lines
#script from http://readlist.com/lists/ruby-lang.org/ruby-talk/11/55390.html require "narray" class String
February 15, 2008
5:07AM EDT
by brough
View all 33 lines
reviews = []
reviews << "I had a different idea of this place. It was previously owned by Johnny Depp, so you expect cool people to be there. We had to pay 15 dollars to get in. Once there I was dissapointed to see how small and claustrophic the place was, specially the small lounge downstairs. I wanted to leave after my first minute there. A standard rock band was playing with an obnoxious attitude, they were cursing at each other and burping on the microphone during each song. The mum of one of the band members was giving free cds, wich made the whole thing uncool. I didnt take the free cds. Perhaps the place had its golden era in the nineties, but for me it seems to be over. Avoid it, unless you know a good band is playing that night lolz."
February 14, 2008
11:47PM EDT
by brough
View all 42 lines
The Listeners by Walter De La Mare 'Is there anybody there?' said the Traveller, Knocking on the moonlit door;
February 11, 2008
1:25AM EDT
by brough
View all 20 lines
def beds(c) beds = [] if c.double_bedrooms > 0 beds << pluralize(c.double_bedrooms, 'double') end
February 11, 2008
1:10AM EDT
by brough
View all 6 lines
<b>Bus unit</b><br />
<select id="busunit"><option>Transportation Management Solutions</option><option>Brokerage</option><option>Mid-Market (SLS)</option></select>
</p>
February 10, 2008
1:23PM EDT
by brough
View all 33 lines
class Property < ActiveRecord::Base has_many :property_agents has_many :agents, :through => :property_agents end
February 10, 2008
5:38AM EDT
by brough
View all 9 lines
def index render :layout => false if flash[:xhr] == 'moo' end
February 09, 2008
1:52PM EDT
by brough
View all 14 lines
class Reservation < ActiveRecord::Base attr_accessor :no_of_nights
February 09, 2008
1:11PM EDT
by brough
View all 14 lines
styles = (doc/:body/:style) styles.each do |style| if style.inner_text.include?('BA2937') #find the correct inline css tag lines = style.inner_text.gsub(/\s/,'').split('}') #lines.delete_if {|line| line.to_s.include?('BA2937') == false}
January 13, 2008
5:25PM EDT
by brough
View all 248 lines
my take of the 'resources' (I anticipate searching on a lot of these as stock grows...) 001_create_airrifles.rb 008_create_airpistols.rb 015_create_cartridges.rb 002_create_firearms.rb 009_create_ammunitions.rb 016_create_barrels.rb 003_create_shotguns.rb 010_create_scopes.rb 017_create_descriptions.rb
November 15, 2007
1:20AM EDT
by brough
View all 30 lines
File.readlines('a.csv').each do |l| puts l unless l =~ /^\s*$/ end
November 07, 2007
6:27PM EDT
by brough
Event.observe('id-of-link-to-send-form', 'click', function(event){ form ajax here. ;});
