Public Gists by carpeliam

Gravatar
Thu Mar 19 08:35:24 -0700 2009
1
2
3
# Template which configures a generic Rails app with Shoulda, Factory Girl,
# HAML, etc while commiting each step into git.
#
Gravatar
Fri Jan 30 13:09:51 -0800 2009
1
2
3
  desc "Run with same args as db:fixtures:load, but uses semi-sequential IDs"
  task :load_fixtures => :environment do
    require 'active_record/fixtures'
Gravatar
Mon Jan 12 21:59:53 -0800 2009
1
2
3
>> problems.size
=> 99
>> problems.include? "a bitch"
Gravatar
Sun Jan 11 03:10:02 -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
Sun Dec 21 15:08:14 -0800 2008
1
2
3
scope.match("/:permalink").to(:controller => "articles", :action => "show").defer_to do |request, params|
 unless (article = Feather::Article.find_by_permalink(params[:permalink])).nil?
   params.merge(:id => article.id)
Gravatar
Sat Dec 20 23:24:45 -0800 2008
1
2
3
      # having .to() allows this to not die when running 'slice' from cmd line
      scope.match("/:permalink").to(:controller => "articles").defer_to do |request, params|
        unless (article = Feather::Article.find_by_permalink(params[:permalink])).nil?
Gravatar
Mon Dec 15 22:11:27 -0800 2008
1
2
3
carpeliam@devfish:~/groupthink$ thor merb:gem:install
Beginning transaction
/usr/local/lib/site_ruby/1.8/rubygems/requirement.rb:150:in `parse': Illformed requirement [{:require_as=>"redcloth"}] (ArgumentError)
Gravatar
Mon Dec 15 21:12:38 -0800 2008
1
2
3
# dependencies are generated using a strict version, don't forget to edit the dependency versions when upgrading.
merb_gems_version = "1.0.5"
dm_gems_version = "0.9.8"
Gravatar
Mon Dec 15 21:01:57 -0800 2008
1
2
3
carpeliam@devfish:~/groupthink$ thor merb:gem:install
Beginning transaction
/usr/lib/ruby/1.8/fileutils.rb:1262:in `initialize': Permission denied - /home/carpeliam/groupthink/.original_gems/gems/gems/ruby2ruby-1.2.1/bin/r2r_show (Errno::EACCES)
Gravatar
Mon Dec 15 19:13:22 -0800 2008
1
2
3
Introduction
============
This is a port of the Askeet tutorial to Merb.
Gravatar
Mon Dec 08 22:30:39 -0800 2008
1
2
3
class Group
  include DataMapper::Resource
  # ... no need to paste everything, right?
Gravatar
Tue Sep 30 19:48:53 -0700 2008
1
2
3
class Specialty < ActiveRecord::Base
  named_scope :all_by_popularity,
    :select => 'specialties.*, count(specialties.id) AS c',
Gravatar
Tue Sep 09 00:38:04 -0700 2008
1
2
3
<% for i in 1..1000 %>
joe_<%= i %>:
  login: joe_<%= i %>