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
git.rb | 22 +++++++++++++++++++--- | |
1 file changed, 19 insertions(+), 3 deletions(-) | |
--- ./capistrano/recipes/deploy/scm/git.rb.orig | |
+++ ./capistrano/recipes/deploy/scm/git.rb | |
@@ -157,10 +157,26 @@ | |
execute.join(" && ") | |
end | |
- # An expensive export. Performs a checkout as above, then | |
- # removes the repo. |
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
lib/cap-git-archive.rb: | |
------------------------------------------------- | |
require 'capistrano/recipes/deploy/scm/git' | |
Capistrano::Deploy::SCM::Git.class_eval do | |
def export(revision, destination) | |
git = command | |
execute = [] | |
args = [] | |
args << '--format=tar' |
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
git clone http://github.com/dbalmain/ferret.git | |
cd ferret/ruby | |
rake package | |
gem install pkg/ferret-0.11.8.1.gem |
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 file is used by Rack-based servers to start the application. | |
require ::File.expand_path('../config/environment', __FILE__) | |
require ::File.expand_path('../lib/devise_basic_auth_fix', __FILE__) | |
use DeviseBasicAuthFix | |
run MyApp::Application |
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
module DigestAuthForFunctionalTests | |
def authenticate_with_http_digest(user = 'admin', password = 'admin', realm = 'Application') | |
unless ActionController::Base < ActionController::Testing | |
ActionController::Base.class_eval { include ActionController::Testing } | |
end | |
@controller.instance_eval %Q( | |
alias real_process_with_new_base_test process_with_new_base_test | |
def process_with_new_base_test(request, response) |
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 'em-synchrony' | |
require 'test/unit/autorunner' | |
# Patch test::unit to run stuff inside the EM reactor | |
module Test | |
module Unit | |
class AutoRunner | |
alias_method :run_alias, :run | |
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 'rufus/scheduler' | |
class Scheduler | |
# Starts the scheduler unless it is already running | |
def self.start_unless_running(pid_file) | |
with_lockfile(File.join(File.dirname(pid_file), 'scheduler.lock')) do | |
if File.exists?(pid_file) | |
pid = IO.read(pid_file).to_i | |
if pid > 0 && process_running?(pid) | |
puts "not starting scheduler because it already is running with pid #{pid}" |
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
site :opscode | |
cookbook 'apt' |
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
sudo dpkg --add-architecture i386 | |
sudo aptitude install libxv1:i386 libxss1:i386 libasound2:i386 libqt4-dbus:i386 libqtwebkit4:i386 libasound2-plugins:i386 libssl1.0.0:i386 | |
sudo dpkg -i skype-debian_4.2.0.11-1_i386.deb |
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
/etc/rc.local | |
# reduce swapping to a minimum | |
echo 0 > /proc/sys/vm/swappiness | |
/etc/fstab | |
use "noatime,nodiratime,discard" mount options for SSD | |
use tmpfs for tmp and friends: | |
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0 | |
tmpfs /var/spool tmpfs defaults,noatime,mode=1777 0 0 |
OlderNewer