My Recent Pastes (7 and counting)
Pastes by JasonKing (7 and counting)
Below are the 7 most recent pasties by JasonKing.
March 29, 2009
11:57PM EDT
by JasonKing
View all 10 lines
irb(main):002:0> x = 1 => 1 irb(main):003:0> if x == 1 irb(main):004:1> puts "x is 1" irb(main):005:1> x = 2
May 06, 2007
8:44AM EDT
by JasonKing
View all 18 lines
mysql> select * from categories where blurb like '%90\%%'; +----+-------------------------+-------------------+ | id | name | blurb | +----+-------------------------+-------------------+ | 1 | Everyday, In Confidence | I'm 90% that's it |
May 06, 2007
1:27AM EDT
by JasonKing
View all 24 lines
## model.rb class Model < ActiveRecord::Base has_and_belongs_to_many :categories, :order => 'name'
April 23, 2007
10:51AM EDT
by JasonKing
View all 16 lines
## in your controller def foos_for_lookup @foos = Foo.find(:all) @headers['content-type' ] = 'text/javascript'
June 30, 2006
8:36AM EDT
by JasonKing
Assignment.find(:all, :join => "LEFT JOIN courses ON courses.id = assignments.course_id LEFT JOIN courses_teachers AS ca ON courses.id = ca.course_id", :conditions => [ "ca.teacher_id = ?", @TeacherInstance.id ] )
June 23, 2006
2:44AM EDT
by JasonKing
View all 35 lines
## console >> Quantity.get_or_create("1/2") NoMethodError: undefined method `get_or_create' for Quantity:Class
June 10, 2006
8:18AM EDT
by JasonKing
View all 38 lines
## This uses the PastieClient from #528. I've put this in ~/lib/pastie_client.rb which you will see in the Vim code below. Change that require location if you put it somewhere else. ## This is the Vim code, I have ruby compiled in, if you don't - do, it's very neat. If you can't (or won't) then you'll need to write your own macro in Vim to shell-out to the cmdline version, and you'll definitely need xclip or something to read from the copy buffer. This works by Visually highlighting what you want to paste, and hitting p^P, change that binding to whatever you like. If you have xclip installed, then this will use that to put the URL into the select buffer: function! PastiePaste(vmode)
