Public Gists by mech

Gravatar
Sun Aug 30 00:31:44 -0700 2009
1
2
3
      === Epic Snow Leopard Upgrayyyyd Guide ===
 
Son, you’re now living in the land of 64-bit systems.
Gravatar
Mon Jul 27 10:10:22 -0700 2009
1
2
3
rails_root = "/data/github/current"
 
20.times do |num|
Gravatar
Tue Jul 21 07:43:18 -0700 2009
1
2
3
# download, from_repo, and commit_state methods swiped from
# http://github.com/Sutto/rails-template/blob/07b044072f3fb0b40aea27b713ca61515250f5ec/rails_template.rb
 
Gravatar
Tue Jul 21 06:09:02 -0700 2009
1
2
3
desc 'Print out all defined routes in match order, with names. Target specific controller with CONTROLLER=x.'
task :routes => :environment do
  all_routes = ENV['CONTROLLER'] ? ActionController::Routing::Routes.routes.select { |route| route.defaults[:controller] == ENV['CONTROLLER'] } : ActionController::Routing::Routes.routes
Gravatar
Sun Jul 12 20:03:50 -0700 2009
1
2
3
# download and git methods swiped from http://github.com/Sutto/rails-template/blob/07b044072f3fb0b40aea27b713ca61515250f5ec/rails_template.rb
 
require 'open-uri'
Gravatar
Mon Jun 29 05:25:59 -0700 2009
1
2
3
config.action_controller.asset_host = Proc.new do |source, request|
  non_ssl_host = "http://asset#{source.hash % 4}.backpackit.com"
  ssl_host = "https://asset1.backpackit.com"
Gravatar
Tue Jun 16 00:23:54 -0700 2009
1
2
3
class ActiveRecord::Base
  def self.find_values opts
    sql = self.send(:construct_finder_sql, opts)
Gravatar
Tue Mar 17 01:47:31 -0700 2009
1
2
3
#!/bin/bash
# Unattended REE/Passenger installation
# Source: http://weblog.brightlight-ict.nl/2008/12/unattended-passenger-ruby-enterprise-installation-on-ubuntu-8/