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
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
before_filter :secure_with_ssl | |
private | |
def secure_with_ssl | |
if request.subdomain != 'secure' or request.protocol != 'https' | |
redirect_to :subdomain => 'secure', :protocol => 'https' |
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
source 'http://rubygems.org' | |
gem 'rails', '3.1.0.rc4' | |
gem 'sprockets', '!= 2.0.0.beta.11' | |
gem 'haml-rails' | |
gem 'sass-rails' | |
gem 'compass', :git => 'https://github.com/chriseppstein/compass.git', :branch => 'rails31' | |
gem 'coffee-script' | |
gem 'uglifier' | |
gem 'therubyracer' |
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
start on runlevel [2345] | |
stop on runlevel [016] | |
respawn | |
script | |
exec su -c "/etc/postgresql/bin/postgres -D /usr/local/pgsql/data" postgres | |
end script | |
# note | |
# change the path ( /etc/postgresql/bin/postgres ) to the directory |
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 'aws/s3' | |
require 'heroku' | |
require 'heroku/command' | |
require 'heroku/command/auth' | |
require 'heroku/command/pgbackups' | |
task :cron do | |
class Heroku::Auth | |
def self.client | |
Heroku::Client.new ENV['heroku_login'], ENV['heroku_passwd'] |
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
group :development do | |
gem "pry" | |
gem "pry-doc" | |
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
# encoding: utf-8 | |
require "cheddargetter_client_ruby" | |
require "terminal-table" | |
require "parallel" | |
require "active_support/time" | |
module CheddarGetter | |
class TransactionSummary |
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
.DS_Store | |
*.swp | |
*.swo | |
Gemfile.lock |
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
[Service] | |
ExecStart=/home/kill/.rvm/bin/ruby-1.9.2-p290 /home/kill/bin/echo-server.rb | |
User=kill | |
StandardOutput=syslog | |
StandardError=syslog |
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
set :scm, :none | |
set :repository, "." | |
set :deploy_via, :copy |
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
Vagrant::Config.run do |config| | |
config.vm.box = "lucid32" | |
config.vm.customize ["modifyvm", :id, "--memory", 2048] | |
config.vm.network :hostonly, "192.168.33.10" | |
config.vm.forward_port 8080, 5080 | |
config.vm.forward_port 8443, 5443 | |
end |