-
They run in the background, thus there is no visibility as to whether they succeed or fail.
-
Deploying an app from start to finish involves multiple users, and if done right requires sudo privileges. The system user under which the app runs must not have sudo privileges, but the app itself would use Foreman ideally. If you export to Sys V or Upstart, you will need sudo privileges.
This file contains hidden or 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
| worker: QUEUE=* bundle exec rake environment resque:work | |
| scheduler: bundle exec rake environment resque:scheduler |
This file contains hidden or 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 :test, :development do | |
| gem 'guard-rspec' | |
| gem 'guard-cucumber' | |
| gem 'libnotify' | |
| gem 'foreman' | |
| end |
This file contains hidden or 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/env ruby | |
| require 'rubygems' | |
| require 'rotp' | |
| require 'time' | |
| user = ARGV[0] | |
| secret = ARGV[1] | |
| abort unless user and secret | |
| trap("INT") do |
This file contains hidden or 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 hidden or 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
| # NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776 | |
| $ sudo apt-get install openssl-dev | |
| $ gem install passenger -v=3.0.12 --no-ri --no-rdoc | |
| $ passenger-install-nginx-module --extra-configure-flags="--with-pcre=/usr/src/pcre-8.30 --with-openssl-opt=no-krb5 --with-http_gzip_static_module --with-http_stub_status_module --without-mail_pop3_module --without-mail_smtp_module --without-mail_imap_module" |
This file contains hidden or 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
| # See blog post at http://vitobotta.com/sinatra-contact-form-jekyll/ | |
| %w(rubygems sinatra liquid active_support/secure_random resolv open-uri pony haml).each{ |g| require g } | |
| APP_ROOT = File.join(File.dirname(__FILE__), '..') | |
| set :root, APP_ROOT | |
| set :views, File.join(APP_ROOT, "_layouts") | |
| not_found do |
This file contains hidden or 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
| function! s:Todo() | |
| call s:OpenBufferFromCommand('ditz todo', function('s:IssueCallback')) | |
| endfunction | |
| function! s:TodoAll() | |
| call s:OpenBufferFromCommand('ditz todo --all', function('s:IssueCallback')) | |
| endfunction | |
| function! s:Grep(args) | |
| call s:OpenBufferFromCommand(printf('ditz grep "%s"', a:args), function('s:IssueCallback')) |
by Jonathan Rochkind, http://bibwild.wordpress.com
Capistrano automates pushing out a new version of your application to a deployment location.
I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".
This file contains hidden or 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/env ruby | |
| # Jabber-SH — SH console via XMPP/Jabber (GTalk) | |
| # | |
| # Jabber-SH allows you to administrate a remote computer via a command line | |
| # through a Jabber client. It’s like SSH via GoogleTalk! :) | |
| # This is just a hack but it might be usefull sometime to run basic commands | |
| # on a machine that is not accessible via ssh. | |
| # | |
| # Philippe Creux. pcreux/AT/gmail/DOT/com |