Installs ruby-2.0.0-p0 on ubuntu via checkinstall so it's in your package manager and you can remove it.
Quick install:
curl -L https://gist.github.com/ngauthier/5039249/raw/1868bf4714052b40e2bb7fdf3f40fbeb5d730bca/ruby-2-install-ubuntu.sh | bash -s
Installs ruby-2.0.0-p0 on ubuntu via checkinstall so it's in your package manager and you can remove it.
Quick install:
curl -L https://gist.github.com/ngauthier/5039249/raw/1868bf4714052b40e2bb7fdf3f40fbeb5d730bca/ruby-2-install-ubuntu.sh | bash -s
| #!/bin/sh | |
| NGINX_VERSION=1.3.8 | |
| TMP_PATH=/tmp | |
| # Fetch and extract Nginx | |
| cd $TMP_PATH | |
| wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz | |
| tar xvfz nginx-$NGINX_VERSION.tar.gz | |
| cd nginx-$NGINX_VERSION |
| #!/bin/bash | |
| # Sends the length of each resque queue to Librato Metrics. | |
| # Run it on a cron job and you'll have an idea of how backed up (or not) your queues are. | |
| API_EMAIL="[email protected]" | |
| API_TOKEN="1234..." | |
| body="" | |
| i=0 |
| module Capybara | |
| def Capybara.auto_save_and_open_page=(val) | |
| @auto_save_and_open_page = !!val | |
| end | |
| def Capybara.auto_save_and_open_page? | |
| @auto_save_and_open_page ||= false | |
| end | |
| end |
| # note: there is work afoot to load pbf directly with osm2pgsql | |
| # http://lists.openstreetmap.org/pipermail/dev/2010-October/020953.html | |
| # but for now osmosis >= 0.37 works best | |
| # install java/osmosis if you don't already have it | |
| sudo apt-get install sun-java6-jre | |
| wget http://bretth.dev.openstreetmap.org/osmosis-build/osmosis-0.37.zip | |
| unzip osmosis-0.37.zip | |
| cd osmosis-0.37 | |
| chmod +x bin/osmosis |
| #! /bin/bash | |
| ### BEGIN INIT INFO | |
| # Provides: unicorn | |
| # Required-Start: $local_fs $remote_fs $network $syslog | |
| # Required-Stop: $local_fs $remote_fs $network $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: starts the unicorn web server | |
| # Description: starts unicorn |
| $ cd /usr/src | |
| $ wget http://nginx.org/download/nginx-0.8.52.tar.gz | |
| $ tar xzvf ./nginx-0.8.52.tar.gz | |
| $ rm ./nginx-0.8.52.tar.gz | |
| $ gem install s3sync capistrano capistrano-ext passenger --no-ri --no-rdoc | |
| $ passenger-install-nginx-module | |
| # Automatically download and install Nginx? 2. No: I want to customize my Nginx installation | |
| # Where is your Nginx source code located?: /usr/src/nginx-0.8.52 | |
| # Where do you want to install Nginx to?: /opt/nginx |
| set :application, "hermes" | |
| set :repository, "git@your_repository:hermes.git" | |
| set :user, 'root' | |
| set :use_sudo, false | |
| set :deploy_via, :remote_cache | |
| set :scm, :git | |
| # Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none` | |
| role :web, "xxx.com" # Your HTTP server, Apache/etc |
| def output name=((default=true); "caius") | |
| puts "name: #{name.inspect}" | |
| puts "default: #{default.inspect}" | |
| end | |
| output | |
| # >> name: "caius" | |
| # >> default: true | |
| output "avdi" |
| namespace :deploy do | |
| namespace :assets do | |
| task :precompile, :roles => :web, :except => { :no_release => true } do | |
| from = source.next_revision(current_revision) | |
| if capture("cd #{latest_release} && #{source.local.log(from)} vendor/assets/ app/assets/ | wc -l").to_i > 0 | |
| run %Q{cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile} | |
| else | |
| logger.info "Skipping asset pre-compilation because there were no asset changes" | |
| end | |
| end |