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 ActiveRecord::Base | |
@@cache_store = nil | |
def self.cache_store | |
@@cache_store ||= ActionController::Base.cache_store | |
end | |
def self.caches(method_name, key = nil, options = {}, &block) | |
if key.is_a?(Hash) | |
options = key | |
key = nil |
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
# | |
# cucumber.yml | |
# | |
# Filter which features are run with each profile by the file extension | |
webrat: --require features/steps/common --require features/support/webrat_env.rb --exclude selenium.feature --format progress | |
selenium: --require features/steps/common --require features/support/selenium_env.rb --exclude webrat.feature --format progress | |
# | |
# features/support/env.rb |
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
# | |
# cucumber.yml | |
# | |
# Filter which features are run with each profile by the file extension | |
webrat: --require features/steps/common --require features/support/webrat_env.rb --exclude selenium.feature --format progress | |
selenium: --require features/steps/common --require features/support/selenium_env.rb --exclude webrat.feature --format progress | |
# | |
# features/support/env.rb |
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
# | |
# cucumber.yml | |
# | |
# Filter which features are run with each profile by the file extension | |
webrat: --require features/steps/common --require features/support/webrat_env.rb --exclude selenium.feature --format progress | |
selenium: --require features/steps/common --require features/support/selenium_env.rb --exclude webrat.feature --format progress | |
# | |
# features/support/env.rb |
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
ActionView::Helpers::AssetTagHelper.register_javascript_expansion({ | |
html5shiv: "http://html5shiv.googlecode.com/svn/trunk/html5.js", | |
ie7js: "http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE7.js", | |
ie8js: "http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js", | |
jquery: "http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js" | |
}) |
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
# unicorn_rails -c /data/github/current/config/unicorn.rb -E production -D | |
rails_env = ENV['RAILS_ENV'] || 'production' | |
# 16 workers and 1 master | |
worker_processes (rails_env == 'production' ? 16 : 4) | |
# Load rails+github.git into the master before forking workers | |
# for super-fast worker spawn times | |
preload_app true |
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
# Bash snippet to open new shells in most recently visited dir. | |
# Useful if you want to open a new terminal tab at the present | |
# tab's location. | |
# | |
# Put this in your .bashrc or whatever. | |
pathed_cd () { | |
if [ "$1" == "" ]; then | |
\cd | |
else |
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
# Make port 80 "real life" speeds | |
# You can also use Mongrel ports. | |
function slow_port { | |
# Set the port variable if no port inputted. Defaulted to 80 (for Passenger). | |
if [ -z "$1" ] | |
then port=80 | |
else port=$1 | |
fi | |
# Slow the ports. |
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
#!/usr/bin/ruby -w | |
=begin | |
/*************************************************************************** | |
* Copyright (C) 2008, Paul Lutus * | |
* * | |
* This program is free software; you can redistribute it and/or modify * | |
* it under the terms of the GNU General Public License as published by * | |
* the Free Software Foundation; either version 2 of the License, or * |
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
# This is an event.d (upstart) script to keep monit running. | |
# To install disable the old way of doing things: | |
# | |
# /etc/init.d/monit stop && update-rc.d -f monit remove | |
# | |
# then put this script here: | |
# | |
# /etc/init/monit.conf | |
# | |
# and reload upstart configuration: |
OlderNewer