March 2011
1 post
January 2011
2 posts
November 2010
4 posts
October 2010
2 posts
September 2010
1 post
October 2009
0 posts
August 2009
1 post
July 2009
1 post
June 2009
1 post
December 2008
1 post
September 2008
2 posts
August 2008
7 posts
require ‘open-uri’require ‘hpricot’ class Gistr def initialize(gist_id) @gist_id = gist_id end def post(email, password, title) post_to_tumblr(email, password, title, gist_code) end def gist_code return @gist_code if @gist_code # Use the secret .pibb format code =...
# Parallel map# Originally from http://project.ioni.st/post/2332#snippet_2332class Array def pmap threads = [] 0.upto(size - 1) do |n| threads « Thread.new do yield(at(n)) end end threads.collect {|thread| thread.value} endend # Trade-off between resource consumption# and speed of execution.# Much faster in some scenarios, # much...
## Created by Eric Lindvall <eric@5stops.com>## Making it simple to provide input for http://wordle.net/create## require ‘rubygems’gem ‘mechanize’require ‘mechanize’ def collect_entries(page) page.parser.search(‘.entry-content’).collect do |span|...
May 2008
2 posts
January 2008
5 posts
December 2007
4 posts
September 2007
2 posts
August 2007
1 post
July 2007
14 posts