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
# directory: config/initializers/ | |
# only loads the values of the current environment | |
GLOBAL_VAR = YAML.load_file("#{Rails.root}/config/settings.yml")[Rails.env] |
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
/* Align a table right inside a div element */ | |
/* Adjust accordingly for centering the table */ | |
div.contains_table { | |
text-align: right; | |
} | |
div.contains_table table { | |
margin-right: 0; | |
margin-left: auto; | |
} |
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
<% number = File.read(File.dirname(__FILE__) + "/../../../REVISION").strip[0..7] if File.exists?(File.dirname(__FILE__) + "/../../../REVISION") %> | |
Commit: <%= number || "CURRENT" %> |
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_VERSION = `git describe --always`.strip unless defined? APP_VERSION |
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
# parses out the current branch you're on. See: http://www.harukizaemon.com/2008/05/deploying-branches-with-capistrano.html | |
current_branch = `git branch`.match(/\* (\S+)\s/m)[1] | |
# use the branch specified as a param, then use the current branch. If all fails use master branch | |
set :branch, ENV['branch'] || current_branch || "master" # you can use the 'branch' parameter on deployment to specify the branch you wish to deploy |
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
def index | |
@instance = Model.search(params[:search], :include => :associated_model).paginate(:page => params[:page]) | |
respond_to do |format| | |
format.html | |
format.js | |
end | |
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
(500px) Request phase initiated. | |
Started GET "/auth/500px" for 127.0.0.1 at 2012-04-29 10:37:56 +1200 |
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
tail -f log/development.log |grep 'INSERT INTO\|UPDATE\|DELETE FROM' |