Skip to content

Instantly share code, notes, and snippets.

sudo port install beanstalkd
sudo port install memcached
sudo gem install beanstalk-client
sudo gem install memcache-client
# to start
beanstalkd -d
memcached -d
# Allow the metal piece to run in isolation
require(File.dirname(__FILE__) + "/../../config/environment") unless defined?(Rails)
class Test
def self.call(env)
if env["PATH_INFO"] =~ /^\/test/
[200, {"Content-Type" => "text/html"}, ["Hello, World!"]]
else
[404, {"Content-Type" => "text/html"}, ["Not Found"]]
end
def call(env)
@metals.keys.each do |app|
result = app.call(env)
return result unless result[0].to_i == 404
end
@app.call(env)
end
sudo gem rdoc --all --no-ri
rdoc: --inline-source --line-numbers --format=html --template=hanna
@jseifer
jseifer / gist:68367
Created February 22, 2009 06:40
Regenerate all rdocs in hanna
gem install mislav-hanna
On Feb 20, 2009, at 4:24 PM, "Olusegun A.A" <[email protected]> wrote:
** CRAIGSLIST ADVISORY --- AVOID SCAMS BY DEALING LOCALLY
** Avoid: wiring money, cross-border deals, work-at-home
** Beware: cashier checks, money orders, escrow, shipping
** More Info: http://www.craigslist.org/about/scams.html
Hello,
Do you still have this item available for sale at the moment? Get back asap.
@jseifer
jseifer / .caprc
Created February 20, 2009 16:06 — forked from siebertm/.caprc
# ever wanted capistrano talk to you?
# this is used with ext/multistage and only works on a mac
require 'capistrano_colors'
before :deploy, :say_begin_deploy
after :deploy, :say_end_deploy
task :say_begin_deploy do
`say deploying #{ARGV[0]}`
end
@jseifer
jseifer / gist:66362
Created February 18, 2009 14:35
Turn off webrat's auto open of failed tests
Webrat.configure do |config|
config.mode = :rails
config.open_error_files = false
end
# Mephisto to Wordpress converter
#
# Create your database credentials in mephisto.yml and wordpress.yml
# then run ruby converter.rb
#
require 'rubygems'
require 'activerecord'
require 'activesupport'
require 'yaml'