This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "net/http" | |
| class CukeSunspot | |
| def initialize | |
| @server = Sunspot::Rails::Server.new | |
| end | |
| def start | |
| unless started? | |
| @started = Time.now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT tags.*, taggings.count | |
| FROM tags | |
| JOIN ( | |
| SELECT | |
| taggings.tag_id, | |
| count(*) as count | |
| FROM taggings | |
| INNER JOIN companies ON companies.id = taggings.taggable_id | |
| AND taggings.taggable_type = 'Company' | |
| AND `companies`.`visible` = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Dir["#{Rails.root}/app/glue/**/*.rb"].each do |adhesive| | |
| require adhesive | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Started GET "/?a[]=b" for 127.0.0.1 at 2010-02-11 11:37:42 | |
| NoMethodError (undefined method `each' for "b":String): | |
| Rendered /Users/tomeric/.bundle/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.1ms) | |
| Rendered /Users/tomeric/.bundle/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (3.2ms) | |
| Rendered /Users/tomeric/.bundle/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within /Users/tomeric/.bundle/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/templates/rescues/layout.erb (16.7ms) | |
| Trace: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ cat .git/hooks/post-checkout | |
| #! /bin/sh | |
| # Start from the repository root. | |
| cd ./$(git rev-parse --show-cdup) | |
| branch=`git branch | grep '*' | cut -d" " -f2` | |
| if [ $3 -eq 1 ] | |
| then | |
| cp config/${branch}.database.yml config/database.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| context "transcoding a movie" do | |
| codecs = [ { :context => 'XviD', :file => 'xvid.avi', :content_type => 'video/x-msvideo' }, | |
| { :context => 'DivX5', :file => 'divx5.avi', :content_type => 'video/x-msvideo' }, | |
| { :context => 'h.264', :file => 'h264.avi', :content_type => 'video/x-msvideo' }, | |
| { :context => 'h.263', :file => 'h263.mov', :content_type => 'video/quicktime' }, | |
| { :context => 'h.261', :file => 'h261.avi', :content_type => 'video/x-msvideo' }, | |
| { :context => 'MPEG-1', :file => 'mpeg1.mpg', :content_type => 'video/mpeg' }, | |
| { :context => 'MPEG-2', :file => 'mpeg2.mpeg', :content_type => 'video/mpeg' }, | |
| { :context => 'MPEG-3', :file => 'mpeg3.avi', :content_type => 'video/x-msvideo' }, | |
| { :context => 'WMV', :file => 'wmv.wmv', :content_type |