Public Gists by kastner

Gravatar
Wed Nov 18 12:48:45 -0800 2009
1
2
3
# Ruby Enterprise Edition
cd src
curl -LO http://rubyforge.org/frs/download.php/66162/ruby-enterprise-1.8.7-2009.10.tar.gz
Gravatar
Tue Nov 10 15:32:49 -0800 2009
1
2
3
>> tweet = %q{this is my "tweet" message}
=> "this is my "tweet" message"
>> term = tweet[/"(.+?)"/,1]
Gravatar
Mon Nov 09 17:26:50 -0800 2009
1
2
3
module Harmony
  # Allows accessing config variables from harmony.yml like so:
  # Harmony[:domain] => harmonyapp.com
Gravatar
Fri Oct 30 07:33:58 -0700 2009
1
2
3
module Rack
  # Apache and others set HTTP_X_FORWARDED_HOST for proxied connections
  # This middleware detects it and makes it look like the HOST
Gravatar
Thu Oct 29 21:57:21 -0700 2009
1
2
3
# Lo-fi client for the Facebook API. E.g.:
#
# fb = FacebookClient.new(:api_key => 'api-key', :secret => 'secret')
Gravatar
Mon Oct 19 14:45:49 -0700 2009
1
2
3
#!/usr/bin/env ruby
#####################################################################################
# Extract images from Saks
Gravatar
Thu Oct 15 12:24:59 -0700 2009

      
Gravatar
Thu Oct 15 12:22:09 -0700 2009

      
Gravatar
Sun Oct 11 19:49:12 -0700 2009
1
2
3
Sinatra+Mustache Partial Madness
================================
 
Gravatar
Tue Oct 06 21:19:52 -0700 2009
1
2
3
diff --git a/app/models/asset.rb b/app/models/asset.rb
index 19a5d0c..a3177ba 100644
--- a/app/models/asset.rb
Gravatar
Wed Sep 30 21:04:02 -0700 2009
1
2
3
#!/usr/bin/env ruby -wKU
 
def replace(char)
Gravatar
Sun Sep 27 20:20:43 -0700 2009
1
2
3
diff --git a/app/controllers/assets_controller.rb b/app/controllers/assets_controller.rb
index 913af3c..d136fcd 100644
--- a/app/controllers/assets_controller.rb
Gravatar
Fri Sep 25 18:23:15 -0700 2009
1
(__)__)=========D ~ ~ (__☼__)
Gravatar
Tue Sep 15 12:11:01 -0700 2009
1
2
3
#!/usr/bin/env ruby
%w|rubygems active_record irb|.each {|lib| require lib}
class Vendor < ActiveRecord::Base
Gravatar
Wed Sep 09 12:46:19 -0700 2009
1
2
3
require 'httparty'
 
class Etsy
Gravatar
Sun Aug 30 08:29:14 -0700 2009
1
2
3
require 'rubygems'
require 'context'
require 'matchy'
Gravatar
Wed Aug 26 14:18:36 -0700 2009
1
2
3
Poor Man's Deploy
=================
 
Gravatar
Mon Jul 06 13:13:06 -0700 2009
1
2
3
#!/usr/bin/env ruby
%w|rubygems active_record irb|.each {|lib| require lib}
 
Gravatar
Mon Jul 06 05:25:05 -0700 2009
1
2
3
caption always "%m/%d/%y %0c%{=b kW} %-Lw%{= bd}%50>%n%f* %t%{-}%<%+Lw"
startup_message off
autodetach on
Gravatar
Thu Jun 25 14:04:49 -0700 2009
1
2
3
class BooksController < ApplicationController
  rescue_from ActiveRecord::RecordNotFound, :with => :book_not_found