Public Gists by ariejan

gist: 239578 RSpec + Mocha + Catching ra...
Gravatar
Fri Nov 20 07:57:04 -0800 2009
1
2
3
class Blah
  def self.go
    begin
Gravatar
Mon Nov 09 01:25:43 -0800 2009
1
2
3
class Feed
  has_many :imports
  
Gravatar
Mon Sep 07 03:47:29 -0700 2009
1
2
3
class YourModel < ActiveRecord::Base
  validates_format_of :email, :with => RFC822::EmailAddress
end
gist: 181167 Rails 2.3.x template
Gravatar
Fri Sep 04 14:51:13 -0700 2009
1
2
3
# This Rails 2.3.x template will create a new git-based Rails project
# with Cucumber, RSpec and Remarkable pre-installed and ready to go.
#
gist: 176845 Easily report app version a...
Gravatar
Fri Aug 28 01:44:53 -0700 2009
1
2
3
You must be using git and capistrano to deploy your app. Capistrano will place a file in your Rails.root named 'REVISION'. Tested with the following capistrano setting:
 
set :scm, :git
Gravatar
Fri Aug 14 01:33:32 -0700 2009
1
2
3
# This little nugget will remove an existing rake task. This allows you to
# redefine tasks.
#
Gravatar
Fri Aug 07 05:49:47 -0700 2009
1
2
3
# Use ApiKey.generate to generate a new API key
class ApiKey < ActiveRecord::Base
  
Gravatar
Sat Jun 20 06:11:04 -0700 2009
1
2
3
%! program = pdflatex
 
\documentclass[9pt,twoside,pageany]{memoir}
Gravatar
Thu Jun 04 00:52:47 -0700 2009
1
2
3
/* -------------------------------------------------------------------------------------------------
 
It's *strongly* suggested that you don't modify this file. Instead, load a new stylesheet after
Gravatar
Fri May 22 05:06:59 -0700 2009
1
2
3
Second line in view:
 
Expected: /artikelen/frontpage/123
gist: 62025 Easily update generated thu...
Gravatar
Wed Feb 11 06:19:07 -0800 2009
1
2
3
# recreates all file_column images in all needed sizes
class ImageUpdater
  
Gravatar
Wed Feb 04 05:47:25 -0800 2009
1
2
3
def get_random_number
  return 4 //chosen by fair dice roll.
//guaranteed to be random.
Gravatar
Sun Feb 01 07:54:27 -0800 2009
1
2
3
# Link to local copy of edge rails
  inside('vendor') { run 'ln -s ~/rails/rails rails' }
 
gist: 52935 Rails Template: jQuery, Res...
Gravatar
Mon Jan 26 11:43:47 -0800 2009
1
2
3
# Link to local copy of edge rails
  inside('vendor') { run 'ln -s ~/rails/rails rails' }
 
gist: 44638 Rails subdomain support (fo...
Gravatar
Wed Jan 07 23:53:41 -0800 2009
1
2
3
# 1) Point *.example.com in your DNS setup to your server.
#
# 2) Setup an Apache vhost to catch the star pointer:
Gravatar
Tue Jan 06 14:38:24 -0800 2009
1
2
3
import java.util.regex.*;
 
class Regex2 {
Gravatar
Tue Jan 06 14:30:25 -0800 2009
1
2
3
import java.io.*;
 
public class TestSer {
Gravatar
Tue Jan 06 02:20:26 -0800 2009
1
2
3
require 'rss/1.0'
require 'rss/2.0'
require 'hpricot'
Gravatar
Tue Jan 06 01:51:32 -0800 2009
1
2
3
class Article < ActiveRecord::Base
  # Nothing to do here really...
end
Gravatar
Wed Dec 03 07:52:27 -0800 2008
1
2
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.protect_against_forgery?