Having trouble installing the latest stable version of tmux?
Save yourself some time and run this little fellow!
- gcc
- wget
Having trouble installing the latest stable version of tmux?
Save yourself some time and run this little fellow!
| # | |
| # Wide-open CORS config for nginx | |
| # | |
| location / { | |
| if ($request_method = 'OPTIONS') { | |
| add_header 'Access-Control-Allow-Origin' '*'; | |
| # |
| # Forked to get it working with Rails 3 and RSpec 2 | |
| # | |
| # From http://github.com/jaymcgavren | |
| # | |
| # Save this as rcov.rake in lib/tasks and use rcov:all => | |
| # to get accurate spec/feature coverage data | |
| # | |
| # Use rcov:rspec or rcov:cucumber | |
| # to get non-aggregated coverage reports for rspec or cucumber separately |
| git diff $1 | grep "^\+[^+]\{3\}" | grep -v "^\+[\t ]*$" | wc -l |
| module Prepending | |
| def append_features(base) | |
| prepend = self | |
| base.extend Module.new { define_method(:new) { |*args,&block| super(*args,&block).extend(prepend) }} | |
| end | |
| end | |
| module CanCook | |
| extend Prepending |
| namespace :queues do | |
| desc "Run Resque workers with options and job classes loaded" | |
| # Run with & appended to daemonize | |
| task :workers => :environment do | |
| def pid_directory | |
| Rails.root.join('tmp', 'pids') | |
| end |
| after "deploy:symlink", "deploy:restart_workers" | |
| after "deploy:restart_workers", "deploy:restart_scheduler" | |
| ## | |
| # Rake helper task. | |
| # http://pastie.org/255489 | |
| # http://geminstallthat.wordpress.com/2008/01/27/rake-tasks-through-capistrano/ | |
| # http://ananelson.com/said/on/2007/12/30/remote-rake-tasks-with-capistrano/ | |
| def run_remote_rake(rake_cmd) | |
| rake_args = ENV['RAKE_ARGS'].to_s.split(',') |
| # run with: god -c /path/to/config.god [add -D if you want to not-deamonize god] | |
| # This is the actual config file used to keep the delayed_job running | |
| APPLICATION_ROOT = "/var/www/application" | |
| RAILS_ENV = "production" | |
| God.watch do |w| | |
| w.name = "delayed_job_production" | |
| w.interval = 15.seconds | |
| w.start = "/bin/bash -c 'cd #{APPLICATION_ROOT}/current; /usr/bin/env RAILS_ENV=#{RAILS_ENV} #{APPLICATION_ROOT}/current/script/delayed_job start > /tmp/delay_job.out'" |