My Recent Pastes (71 and counting)
All Pasties (over 71 and counting)
Below are summaries of the 15 most recent pasties by Erik Kastner.
August 26, 2007
1:59AM EDT
by Erik Kastner
View more (145 lines)
1 2 3 4 5 |
#import <CoreFoundation/CoreFoundation.h> #import <Foundation/Foundation.h> #import <UIKit/CDStructures.h> #import <UIKit/UIPushButton.h> #import <UIKit/UIThreePartButton.h> |
August 26, 2007
1:39AM EDT
by Erik Kastner
View more (8 lines)
1 2 3 4 5 |
NSRange match = [anObject rangeOfString:@"IMG_0063"];
int length = match.length;
if (length > 0) {
NSLog(@"Yes");
}
|
May 24, 2007
12:19PM EDT
by Erik Kastner
View more (95 lines)
1 2 3 4 5 |
#!/usr/bin/env ruby require 'osx/cocoa' include OSX |
May 05, 2007
2:01AM EDT
by Erik Kastner
View more (31 lines)
1 2 3 4 5 |
#!/usr/bin/env ruby require 'rubygems' require 'hpricot' require 'open-uri' |
May 05, 2007
1:44AM EDT
by Erik Kastner
View more (9 lines)
1 2 3 4 5 |
class PrivateMessage
attr_accessor :tweet_id, :sender_id, :raw_text, :sent_at
def initialize(options = {})
options.keys.each do |key|
|
April 30, 2007
11:51PM EDT
by Erik Kastner
View more (62 lines)
1 2 3 4 5 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> |
April 14, 2007
8:55PM EDT
by Erik Kastner
View more (90 lines)
1 2 3 4 5 |
require File.dirname(__FILE__) + '/../test_helper'
def default_options(options = {})
{
:user_id => 3829,
|
April 14, 2007
6:03PM EDT
by Erik Kastner
View more (29 lines)
1 2 3 4 5 |
def avatar_for(user, link = false, size = "64x64", options_for_link = {})
buddy_icon = buddy_icon_for(user, size)
if featured?(user)
featured(size) do |badge|
|
April 13, 2007
12:47AM EDT
by Erik Kastner
View more (6 lines)
1 2 3 4 5 |
>> @unit.monthly_rent_amount
=> 0
>> @unit.attributes
=> {"occupied"=>false, "monthly_rent_amount"=>0, "bedrooms"=>nil, "apt_num"=>"", "rent_due_date"=>nil, "last_modified_by_user_id"=>1, "lease_id"=>nil, "late_fee_due_date"=>nil, "property_id"=>10, "last_date_rent_assessed"=>nil, "balance_amount"=>0, "due_day"=>1, "occupied_since"=>Mon Jan 01 00:00:00 MST 2001, "company_id"=>2, "created_at"=>nil}
>> @unit.errors
|
April 13, 2007
12:38AM EDT
by Erik Kastner
View more (7 lines)
1 2 3 4 5 |
def monthly_rent_amount_in_dollars=(rent)
self.monthly_rent_amount = (rent.to_f * 100).to_i
end
def monthly_rent_amount_in_dollars
|
April 13, 2007
12:23AM EDT
by Erik Kastner
View more (20 lines)
1 2 3 4 5 |
if request.post?
@unit = Unit.new(params[:unit])
# @myhash = Hash.new
# @myhash[:company_id] = session[:user][:company_id]
# @myhash[:last_modified_by_user_id] = session[:user][:id]
|
April 12, 2007
10:58PM EDT
by Erik Kastner
View more (20 lines)
1 2 3 4 5 |
## config/envrionment.rb
config.load_paths += %W(#{RAILS_ROOT}/app/concerns)
(in the Rails::Initializer.run section)
## app/concerns/pennies.rb (create the concerns dir)
|
April 12, 2007
5:15PM EDT
by Erik Kastner
View more (51 lines)
1 2 3 4 5 |
require File.dirname(__FILE__) + '/../test_helper'
def default_comment(options = {})
{
:user_id => 3829,
|
April 04, 2007
9:21PM EDT
by Erik Kastner
View more (50 lines)
1 2 3 4 5 |
#!/usr/bin/env ruby
%w|rubygems hpricot active_record open-uri irb|.each{|lib| require lib}
class Parse
|
March 25, 2007
4:18AM EDT
by Erik Kastner
View more (42 lines)
1 2 3 4 5 |
#!/usr/bin/env ruby require 'rubygems' require 'fastercsv' require 'gruff' |
Pastie