Public Gists by radar

Gravatar
Wed Sep 02 17:28:34 -0700 2009
1
2
3
1. Click ticket
2. Click update
3. Click status box
Gravatar
Thu Aug 27 23:07:52 -0700 2009
1
2
3
frozenplague:~ ryanbigg$ sudo gem install pg
Password:
Building native extensions. This could take a while...
Gravatar
Thu Aug 27 01:51:04 -0700 2009
1
2
3
From the disk
 
XCode
Gravatar
Sun Aug 23 18:53:24 -0700 2009
1
2
3
frozenplague:Sites radar$ ls -al | wc -l
     237
 
Gravatar
Fri Aug 21 15:47:44 -0700 2009
1
This is a gist
Gravatar
Fri Aug 14 23:42:04 -0700 2009
1
2
3
# For acts_as_audited & authlogic
##################################
#
Gravatar
Tue Aug 11 03:47:17 -0700 2009
1
2
3
sudo env ARCHFLAGS="-arch i386" gem install mysql -- \
  --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib \
  --with-mysql-include=/usr/local/mysql/include
Gravatar
Fri Jul 31 22:54:06 -0700 2009
1
2
3
  namespace :schema do
    desc "Create a db/schema.rb file that can be portably used against any DB supported by AR"
    task :dump => :environment do
Gravatar
Fri Jul 31 22:54:03 -0700 2009
1
2
3
  namespace :schema do
    desc "Create a db/schema.rb file that can be portably used against any DB supported by AR"
    task :dump => :environment do
Gravatar
Fri Jul 31 21:19:56 -0700 2009
1
2
3
  desc "Migrate the database through scripts in db/migrate and update db/schema.rb by invoking db:schema:dump. Target specific version with VERSION=x. Turn off output with VERBOSE=false."
  task :migrate => :environment do
    ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
Gravatar
Thu Jul 23 15:27:44 -0700 2009
1
2
3
>> -630.divmod(60)
=> [-11, 30]
>> 630.divmod(60)
Gravatar
Tue Jul 21 21:26:42 -0700 2009
1
2
3
require 'rubygems'
require 'eventmachine'
require 'digest/md5'
Gravatar
Mon Jul 20 15:11:48 -0700 2009
1
2
3
[2009-07-21 08:10:35] INFO Client connected.
[2009-07-21 08:10:35] ERROR NoMethodError: private method `gsub' called for nil:NilClass
./rexmladdons.rb:856:in `normalize'
Gravatar
Sun Jul 19 21:29:53 -0700 2009
1
2
3
class Time
  def to_date_select_params
    hash = HashWithIndifferentAccess.new
Gravatar
Thu Jul 16 22:37:54 -0700 2009
1
2
3
def diff_as_big_decimal(target, expected)
  if expected < target
    "expected smaller than target"
Gravatar
Thu Jul 16 22:33:43 -0700 2009
1
2
elsif expected.is_a?(BigDecimal) && target.is_a?(BigDecimal)
  message << "\n\n Diff:" << self.differ.diff_as_big_decimal(target, expected)
Gravatar
Wed Jul 15 20:50:11 -0700 2009
1
2
3
require 'rubygems'
require 'nokogiri'
require 'time'
Gravatar
Wed Jul 08 16:39:13 -0700 2009
1
2
3
class Entity < ActiveRecord::Base
  belongs_to :client
  has_many :group_members, :class_name => "Member", :foreign_key => "group_id"
Gravatar
Mon Jul 06 16:24:49 -0700 2009
1
2
3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
Gravatar
Sun Jul 05 21:20:44 -0700 2009
1
2
3
>> t = Topic.new
=> #<Topic id: nil, forum_id: nil, subject: nil, user_id: nil, created_at: nil, locked: false, views: 0, sticky: false, last_post_id: nil, delta: nil, deleted: false, ip_id: nil, moved: false, moved_to_id: nil>