Skip to content

Instantly share code, notes, and snippets.

View shanesveller's full-sized avatar
💭
I may be slow to respond.

Shane Sveller shanesveller

💭
I may be slow to respond.
View GitHub Profile
@shanesveller
shanesveller / gist:44413
Created January 7, 2009 20:45 — forked from anonymous/gist:44410
Basecamp-style subdomains with Rails in 3 easy steps, courtesy of DHH
# 1) Point *.example.com in your DNS setup to your server.
#
# 2) Setup an Apache vhost to catch the star pointer:
#
# <VirtualHost *:80>
# ServerName *.example.com
# </VirtualHost>
#
# 3) Set the current account from the subdomain
class ApplicationController < ActionController::Base
@shanesveller
shanesveller / gist:39691
Created December 24, 2008 14:56 — forked from peterc/gist:33337
Super Daring App Template 1.0 for Rails 2.3
# SUPER DARING APP TEMPLATE 1.0
# By Peter Cooper
# Link to local copy of edge rails
inside('vendor') { run 'ln -s ~/dev/rails/rails rails' }
# Delete unnecessary files
run "rm README"
run "rm public/index.html"
run "rm public/favicon.ico"
@shanesveller
shanesveller / unattended-passenger-ree.sh
Created December 22, 2008 21:59 — forked from maran/Unattended Rails (Passenger, Ruby Enterprise) Stack
No changes here yet, this is just for my own reference
#!/bin/bash
VERSION="1.1"
REEV="http://rubyforge.org/frs/download.php/58677/ruby-enterprise-1.8.6-20090610.tar.gz"
REEF="ruby-enterprise-1.8.6-20090610.tar.gz"
REEFF=${REEF%".tar.gz"}
PASSENGER="2.2.4"
echo "#####################################"
echo "Welcome, let's get this party rollin'"
echo "#####################################"
@shanesveller
shanesveller / item.rb
Created December 2, 2008 19:07
Delete all Items not referred to by at least one Toon
class Item
include DataMapper::Resource
property :id, Integer, :key => true
property :name, String
property :icon_base, String
property :item_type, String
for prop in [:max_dura,:slot,:quality]