-
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
| ### | |
| Module dependencies | |
| ### | |
| require.paths.unshift "#{__dirname}/lib/support/express-csrf/" | |
| require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/" | |
| express = require 'express' | |
| app = module.exports = express.createServer() | |
| RedisStore = require 'connect-redis' |
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
| # Used to dynamically add a rails page view when using Jquery Mobile | |
| # Author Nick Treadway @nicktea | |
| window.insert_page = (id, content) -> | |
| page = $("<article id="+id+" data-role='page' data-url="+id+" data-add-back-btn='true'>" + content + "</article>") | |
| page.appendTo('body') | |
| $('a').attr("href", "#" + id).click -> | |
| $.mobile.changePage(page, {transition: "slide"}) | |
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')) |