This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc 'Update all svn- and git-based bundles in TextMate' | |
task 'textmate:bundles:update' do | |
BUNDLES = (Dir[(ENV["HOME"] + "/Library/Application Support/TextMate/Bundles/*")] + Dir[(ENV["HOME"] + "/Library/Application Support/TextMate/Pristine Copy/Bundles/*")]) | |
for subdir in BUNDLES do | |
if File.exist?((subdir + "/.git/config")) then | |
sh("cd #{subdir.gsub(" ", "\\ ")} && git pull") | |
elsif File.exist?((subdir + "/.svn/entries")) then | |
sh("cd #{subdir.gsub(" ", "\\ ")} && svn up") | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc 'Copy ssh-key to authorized_keys on $HOST for $USER' | |
task 'ssh:keys' do | |
host = (ENV["HOST"] | |
user = (ENV["USER"] | |
if (host and user) then | |
sh("ssh #{user}@#{host} 'mkdir -p .ssh/'") | |
sh("cat .ssh/id_dsa.pub | ssh #{user}@#{host} 'cat >> .ssh/authorized_keys'") | |
end | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.new(16) { rand(256) }.pack('C*').unpack('H*').first | |
# => b3512f4972d314da94380e1a70e6814a | |
# Courtesy of http://norbauer.com/notes/generating-access-keys | |
# via rubyjudo.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require "extlib" | |
require "merb-core" | |
require "dm-core" | |
require "dm-timestamps" | |
require "dm-types" | |
require "dm-validations" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 "#####################################" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
OlderNewer