Public Gists by sandal

Gravatar
Fri May 15 07:08:34 -0700 2009

      
Gravatar
Thu May 14 22:05:02 -0700 2009
1
2
3
# http://blog.sigfpe.com/2009/05/three-projections-of-doctor-futamura.html
 
Coin = Struct.new(:currency)
Gravatar
Wed May 13 12:48:00 -0700 2009
1
Hello Jia
Gravatar
Wed May 13 12:47:57 -0700 2009
1
Hello Jia
Gravatar
Sat May 02 09:51:38 -0700 2009
1
2
3
#!/usr/local/bin/ruby
 
require "rubygems"
Gravatar
Thu Apr 16 07:11:57 -0700 2009
1
2
3
class Foo
  def bar
    blah
Gravatar
Wed Apr 15 22:57:54 -0700 2009
1
2
3
class Customer < Service(:crm)
  # my custom methods here.
end
Gravatar
Wed Apr 15 22:40:27 -0700 2009
1
2
3
require 'yaml'
require 'activeresource'
 
Gravatar
Wed Apr 15 22:40:24 -0700 2009
1
2
3
require 'yaml'
require 'activeresource'
 
Gravatar
Wed Apr 15 22:32:52 -0700 2009
1
2
3
class Customer < ActiveResource::Base
  self.site = "http://localhost:3000/"
  self.user = "api"
Gravatar
Wed Apr 15 22:28:32 -0700 2009
1
2
3
def basic_http_auth
  authenticated = false
  authenticate_with_http_basic do |login, password|
Gravatar
Wed Apr 15 21:23:09 -0700 2009
1
2
3
>> Customer.create(:first_name => "Gregory", :last_name => "Brown")
=> #<Customer:0x20d2120 @prefix_options={}, @attributes={"evening_phone"=>nil, "updated_at"=>Thu Apr 16 03:53:59 UTC 2009, "daytime_phone"=>nil, "id"=>1, "first_name"=>"Gregory", "last_name"=>"Brown", "created_at"=>Thu Apr 16 03:53:59 UTC 2009, "email"=>nil}>
 
Gravatar
Wed Apr 15 21:10:36 -0700 2009
1
2
3
class Customer < ActiveResource::Base
  self.site = "http://localhost:3000/"
end
Gravatar
Wed Apr 15 20:59:15 -0700 2009
1
2
3
class CustomersController < ApplicationController
  
  def index
Gravatar
Wed Apr 15 20:31:06 -0700 2009
1
2
3
create_table :customers do |t|
  t.string :first_name
  t.string :last_name
Gravatar
Tue Apr 07 09:36:19 -0700 2009
1
2
3
* Introductions
* Styling
  * Gravatar?
Gravatar
Sat Mar 28 19:24:45 -0700 2009
1
Foo
gist: 86920 ACKNOWLEDGEMENTS
Gravatar
Fri Mar 27 14:53:04 -0700 2009
1
2
3
Over the course of writing Ruby Best Practices, I was thoroughly supported by my
friends, family, and fellow hackers. I want to thank each and every one of the folks
who've helped out with this book, because it would not have existed without them.
Gravatar
Fri Mar 27 14:51:19 -0700 2009
1
2
3
Acknowledgements:
 
Over the course of writing Ruby Best Practices, I was thoroughly supported by
Gravatar
Sun Mar 01 17:07:09 -0800 2009
1
2
3
Rock
Paper
Scissors