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
| set :sync_directories, ["public/assets", "public/galleries"] | |
| set :sync_backups, 3 |
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
| .gradle | |
| gradle-wrapper.* | |
| gradlew* | |
| **/build | |
| gradle-run.dump | |
| **/*$py.class |
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
| wget -P /tmp http://rubyforge.org/frs/download.php/64475/ruby-enterprise-1.8.7-20090928.tar.gz | |
| cd /tmp/ruby-enterprise-1.8.7-20090928 | |
| ./installer --auto=/opt/ruby-enterprise | |
| Then, ruby enterprise will be available: /opt/ruby-enterprise/bin/ruby |
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
| # app/controllers/posts_controller.rb | |
| class PostsController < ApplicationController | |
| def index | |
| @posts.all_cached # Retrive only at once by every 5 minutes | |
| expires_in 5.minutes, :private => false, :public => true | |
| end | |
| end | |
| # app/models/post.rb | |
| Class Post |
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
| namespace :deploy do | |
| desc "Send initial HTTP request to start Phusion Passenger application spawner" | |
| task :kickstart, :roles => :web do | |
| servers = find_servers_for_task(current_task) | |
| servers.each do |server| | |
| run_locally "wget http://#{server.host} -O - > /dev/null" | |
| end | |
| 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
| diff --git a/app/controllers/invitations_controller.rb b/app/controllers/invitations_controller.rb | |
| index bb9e1dc..68a898d 100644 | |
| --- a/app/controllers/invitations_controller.rb | |
| +++ b/app/controllers/invitations_controller.rb | |
| @@ -1,20 +1,16 @@ | |
| class InvitationsController < ApplicationController | |
| + before_filter :require_analyst | |
| + | |
| def new | |
| @invitation = Invitation.new |
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
| # Ruby 1.8.7 and Rails 3.0pre | |
| $ sudo gem install unicorn | |
| $ rails blog -m http://www.lycom.de/files/rails-templates/rails187.txt && cd blog | |
| $ unicorn # similar to the command "rails server" |
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
| # Directly copied from eycap-0.5.2 (thanks!) | |
| # | |
| # With these tasks you can: | |
| # - dump your production database and save it in shared_path/db_backups | |
| # - dump your production into your local database (clone_to_local) | |
| # | |
| # Tested and fixed by fjguzman | |
| Capistrano::Configuration.instance(:must_exist).load do | |
| namespace :db do |
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
| #!/usr/bin/env ruby | |
| # | |
| # Send mass emails to the users of my small private email server | |
| # with TLS. | |
| # | |
| # Queries the MySQL database for my vhost users and sends an | |
| # email with ActionMailer to them. | |
| # | |
| # Install dependencies with `gem install mysql actionmailer` | |
| # |
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
| set :sync_directories, ["public/assets", "public/galleries"] | |
| set :sync_backups, 3 |
OlderNewer