Public Gists by jnstq

Gravatar
Tue May 26 07:58:30 -0700 2009
1
2
3
require 'rubygems'
require 'activerecord'
require 'activesupport'
Gravatar
Wed May 06 03:21:03 -0700 2009
1
2
3
require 'rubygems'
require 'pathname'
 
Gravatar
Tue Apr 28 13:23:53 -0700 2009
1
2
3
For some time here at EdgeCase we've had a bit of a standard for organization of model files in a Rails app. In the body of our model classes, we try to keep things in the following order:
 
   1. Module includes
Gravatar
Mon Apr 27 02:32:46 -0700 2009
1
2
3
  it "should mark order as paid when completed" do
    @payment_notification = Factory.build(:payment_notification, :status => "Completed")
    @payment_notification.save!
Gravatar
Thu Apr 23 08:25:45 -0700 2009
1
2
3
sudo apt-get install imagemagick
sudo apt-get install libmagick9-dev
sudo gem install rmagick
Gravatar
Sun Apr 05 05:41:48 -0700 2009
1
2
3
require 'rubygems'
require 'benchmark'
 
Gravatar
Tue Mar 24 13:22:09 -0700 2009
1
2
3
require "enumerator"
 
 
Gravatar
Sun Mar 22 05:49:17 -0700 2009
1
2
3
class User
  def initialize()
    @context = Context.new
Gravatar
Mon Feb 16 09:21:23 -0800 2009
1
2
3
# remote
cd /var/git
mkdir app_name
Gravatar
Wed Feb 11 14:36:57 -0800 2009
1
2
3
require 'rubygems'
require 'benchmark'
 
Gravatar
Tue Jan 27 08:52:07 -0800 2009
1
2
Capture Stopped
Error: no DV
Gravatar
Thu Jan 22 07:20:37 -0800 2009
1
2
3
    
    def parse(dvgrab_output)
      if dvgrab_output =~ /"([.\w\/]*)":\s+(.*)\s+MiB\s+(\d+)\s+frames\s+timecode\s+(.*)\s+date/
Gravatar
Wed Jan 21 23:49:10 -0800 2009
1
2
3
require 'rubygems'
require 'activesupport'
require 'ostruct'
Gravatar
Wed Jan 21 05:09:06 -0800 2009
1
2
3
Found AV/C device with GUID 0x006037004e545301
Capture Started
"dvgrab-002.dv": 61.80 MiB 450 frames timecode 02:19:44.06 date 2067.02.15 22:26:2525
Gravatar
Tue Jan 20 13:21:19 -0800 2009
1
2
3
Signal.trap("CHLD") do
  puts "Child proccses terminated"
end
Gravatar
Mon Jan 19 00:45:31 -0800 2009
1
2
3
class Penalty < ActiveRecord::Base
end
 
Gravatar
Fri Jan 16 06:10:32 -0800 2009
1
2
3
function authme {
ssh $1 'cat >>.ssh/authorized_keys' <~/.ssh/id_dsa.pub
}
Gravatar
Thu Jan 01 11:02:14 -0800 2009
1
2
3
require 'rubygems'
require 'knock_knock'
require 'hpricot'
Gravatar
Tue Dec 30 14:03:14 -0800 2008
1
2
3
# SUPER DARING APP TEMPLATE 1.0
# By Peter Cooper