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
abstract (1.0.0)
actionmailer (2.3.2, 2.3.1, 2.3.0, 2.2.2, 2.1.2)
actionpack (2.3.2, 2.3.1, 2.3.0, 2.2.2, 2.1.2)
activerecord (2.3.2, 2.3.1, 2.3.0, 2.2.2, 2.1.2)
activeresource (2.3.2, 2.3.1, 2.3.0, 2.2.2, 2.1.2)
activesupport (2.3.2, 2.3.1, 2.3.0, 2.2.2, 2.1.2)
addressable (2.0.2, 2.0.1)
andand (1.3.1)
atom (0.3)
authlogic (2.0.11, 2.0.9, 2.0.8, 2.0.5, 2.0.2)
@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 "#####################################"
require 'rubygems'
require "extlib"
require "merb-core"
require "dm-core"
require "dm-timestamps"
require "dm-types"
require "dm-validations"
abstract (1.0.0)
actionmailer (2.2.2)
actionpack (2.2.2)
activerecord (2.2.2)
activeresource (2.2.2)
activesupport (2.2.2)
addressable (2.0.1)
andand (1.3.1)
atom (0.3)
cgi_multipart_eof_fix (2.5.0)
abstract (1.0.0)
actionmailer (2.2.2)
actionpack (2.2.2, 1.13.6)
actionwebservice (1.2.6)
activerecord (2.2.2, 1.15.6)
activeresource (2.2.2)
activesupport (2.2.2, 1.4.4)
acts_as_ferret (0.4.3)
adamcooke-key-installer (1.1)
addressable (2.0.1)
@shanesveller
shanesveller / access-key.rb
Created December 5, 2008 20:37
Generates a 32-length random key of /[0-9A-F]/ characters
Array.new(16) { rand(256) }.pack('C*').unpack('H*').first
# => b3512f4972d314da94380e1a70e6814a
# Courtesy of http://norbauer.com/notes/generating-access-keys
# via rubyjudo.com
@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]
@shanesveller
shanesveller / remote-git-repo.sake.rb
Created November 21, 2008 19:36
Sake task to remotely create a bare git repo
desc 'Create a new git repository at $GITUSER@$HOST:$REPO/'
task 'git:repo:new' do
user = (ENV["GITUSER"] or "git")
host = ENV["HOST"]
repo = ENV["REPO"]
system("ssh root@#{host} 'cd /home/git/ && mkdir -p #{repo} && cd #{repo} && git --bare init && chown -R git:git /home/git/#{repo}'")
end
# Must have root access, repo owner defaults to 'git'
# Using root user is to account for my preference to use git-shell as the shell on my 'git' user accounts