This file contains 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
1926 David Heinemeier Hansson | |
1615 Jeremy Kemper | |
436 Rick Olson | |
377 Josh Peek | |
354 Jamis Buck | |
339 Nicholas Seckar | |
295 Michael Koziarski | |
244 Pratik Naik | |
156 Marcel Molina Jr. | |
142 Geoff Buesing |
This file contains 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
# version 2.0 of http://ozmm.org/posts/easy_rails_asset_ids_with_git.html | |
repo = Grit::Repo.new('/path/to/your/app/shared/cached-copy') | |
js = repo.log('deploy', 'public/javascripts', :max_count => 1).first | |
css = repo.log('deploy', 'public/stylesheets', :max_count => 1).first | |
ENV['RAILS_ASSET_ID'] = js.committed_date > css.committed_date ? js.id : css.id |
This file contains 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 'open-uri' | |
# url dsl -- the ultimate url dsl! | |
# | |
# You just can't beat this: | |
# | |
# $ irb -r url_dsl | |
# >> include URLDSL | |
# => Object | |
# >> http://github.com/defunkt.json |
This file contains 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
a=[10,20,30,40,50] | |
i = 0 | |
a.each_index {|i| | |
break if a[i] > 20 | |
} |
This file contains 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
## app/models/legacy/article.rb [ruby_on_rails] | |
class Legacy::Node < Legacy::Base | |
set_table_name 'node' | |
set_inheritance_column :node_type | |
set_primary_key :nid | |
default_scope select("*, concat('Legacy::', IF(type = 'ic_article', 'Article', IF(type = 'ic_video', 'Video', concat(UPPER(SUBSTRING(type, 1, 1)), LOWER(SUBSTRING(type, 2)))))) as node_type") | |
end |
This file contains 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
Purging db... | |
Include Seeds? (N|y): y | |
== Including Seeds | |
== Migrating to latest... | |
== AddPlatforms: migrating =================================================== | |
== AddPlatforms: migrated (0.0060s) ========================================== | |
== AddDevices: migrating ===================================================== | |
== AddDevices: migrated (0.0057s) ============================================ |