Skip to content

Instantly share code, notes, and snippets.

View crigor's full-sized avatar

Christopher Rigor crigor

View GitHub Profile
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'lib/models'
require 'rfeedparser'
require 'rack-flash'
use Rack::Session::Cookie
use Rack::Flash
#!/bin/bash
# Unattended REE/Passenger installation
# Source: http://weblog.brightlight-ict.nl/2008/12/unattended-passenger-ruby-enterprise-installation-on-ubuntu-8/
# 15/03/09 Updated to use latest r.e.e. and passenger 2.1 and rewrote bits thanks to the comments left on my blog. Thanks guys
if [ "$(whoami)" != "root" ]; then
echo "You need to be root to run this!"
exit 2
fi
worker_processes 1;
events {
worker_connections 1024;
}
http {
passenger_root /opt/local/lib/passenger;
passenger_ruby /opt/local/bin/ruby;
@crigor
crigor / gist:297194
Created February 7, 2010 03:44 — forked from qrush/gist:296921
gemcutter => redis downloads spec
=================================
keys
----
downloads => global counter for all gem downloads
downloads:today => sorted set for downloads from today
downloads:rubygem:rails => counter for all rails downloads
downloads:version:rails-2.3.5 => counter for all rails 2.3.5 downloads
@crigor
crigor / config.ru
Created February 4, 2011 03:11 — forked from defunkt/config.ru
# Because Unicorn is such a brilliant piece of software, it wraps older,
# non-Rack versions of Rails in a Rack handler. That way Unicorn
# itself can target Rack and not have to worry about monkey patching
# Rails' dispatcher.
#
# This means we can do the same, and even more.
#
# Starting Rackhub locally:
#
# Thin:
@crigor
crigor / eydeploy.rb
Created August 29, 2011 01:48 — forked from nevans/eydeploy.rb
how to use private git repos with bundler at Engine Yard
# put this into your config/eydeploy.rb
def bundle
if File.exist?("#{c.release_path}/Gemfile")
info "~> Gemfile detected, bundling gems"
lockfile = File.join(c.release_path, "Gemfile.lock")
bundler_installer = if File.exist?(lockfile)
get_bundler_installer(lockfile)
else
warn_about_missing_lockfile
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'vagrant-debian-wheezy'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Fixed port collision for 22 => 2222. Now on port 2200.
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
$ vagrant up
Bringing machine 'db' up with 'virtualbox' provider...
Bringing machine 'app' up with 'virtualbox' provider...
[db] Importing base box 'vagrant-debian-wheezy'...
[db] Matching MAC address for NAT networking...
[db] Setting the name of the VM...
[db] Clearing any previously set forwarded ports...
[db] Fixed port collision for 22 => 2222. Now on port 2202.
[db] Creating shared folders metadata...
[db] Clearing any previously set network interfaces...
@crigor
crigor / gist:5711873
Created June 5, 2013 05:55
vagrant up output when using the ansible provisioner
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'vagrant-debian-wheezy'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Fixed port collision for 22 => 2222. Now on port 2200.
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
@crigor
crigor / gist:5722270
Created June 6, 2013 15:12
output of vagrant up using the ansible provisioner
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'vagrant-debian-wheezy'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...