Skip to content

Instantly share code, notes, and snippets.

View lagartoflojo's full-sized avatar
🇨🇱
en 🇩🇪

Hernán Schmidt lagartoflojo

🇨🇱
en 🇩🇪
  • Nürnberg, Deutschland
View GitHub Profile
@lagartoflojo
lagartoflojo / README.markdown
Created July 21, 2011 22:33
Win/Mac/Linux Compatible Capistrano Recipe for Students of your Rails Course

TODO

  • Include basic Gemfile
  • Include Apache config
  • Specify available tasks
  • How to setup the students' PCs

Introduction

When giving a course based on Ruby on Rails, you will have many students coming from different backgrounds, using different Operating Systems, so you want their experience to be as smooth as possible. Deploying applications to the class server can be a pain in other frameworks, but in Rails, using Capistrano and Bundler, it is actually quite easy. This deploy configuration file for Capistrano intends to be as compatible with different OSs, as easy to use, and as complete as possible.

@dhh
dhh / gist:1014971
Created June 8, 2011 18:09
Use concerns to keep your models manageable
# autoload concerns
module YourApp
class Application < Rails::Application
config.autoload_paths += %W(
#{config.root}/app/controllers/concerns
#{config.root}/app/models/concerns
)
end
end
@jpmckinney
jpmckinney / tz_identifiers_to_rails_identifiers.rb
Created January 5, 2011 21:44
Maps tz database time zone identifiers to Rails time zone identifiers
# blog post: http://blog.slashpoundbang.com/post/2613268281/changing-from-tz-database-identifiers-to-rails-friendly
{
"Australia/Adelaide" => "Adelaide",
"Australia/Broken_Hill" => "Adelaide",
"America/Anchorage" => "Alaska",
"America/Juneau" => "Alaska",
"America/Nome" => "Alaska",
"America/Yakutat" => "Alaska",
"Pacific/Gambier" => "Alaska",
"Asia/Almaty" => "Almaty",