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
gem "bson_ext" | |
gem "haml" | |
gem "mongoid", ">= 2.0.0.beta.16" | |
gem "mongoid_rails_migrations" | |
gem "rails3-generators" | |
gem "database_cleaner", :group => :test | |
gem "rspec-rails", ">= 2.0.0.beta.17", :group => :test | |
generators = <<-GENERATORS |
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
gem 'cramp' | |
gem 'erubis', '2.6.5' | |
gem 'thin' | |
gem 'usher', "0.6.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
#!/bin/sh | |
# Configure your desired options here | |
DESIRED_HOSTNAME="lazeroids.com" | |
# Ensure hostname is configured | |
if [ -z "$DESIRED_HOSTNAME" ]; then | |
echo DESIRED_HOSTNAME must be set. | |
exit 1 | |
fi |
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
# Detect rss feed, parse it, and report number of posts per date. | |
require 'rubygems' | |
require 'hpricot' | |
require 'open-uri' | |
# First find the rss | |
url = ARGV[0] || "http://twitter.com/burnto" | |
doc = Hpricot(open(url)) |
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 'activesupport' | |
class String | |
def emphasize substrings | |
highlight self, substrings | |
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
require 'rubygems' | |
require 'open-uri' | |
require 'json' | |
url = 'http://twitter.com/statuses/user_timeline.json?id=visnup&count=3200' | |
dates = open(url) { |f| JSON.parse f.read }.map { |e| Date.parse e['created_at'] } | |
sum = dates.inject(Hash.new(0)) { |s, t| s[t] += 1; s } | |
sum.keys.sort.each { |k| puts "#{k} (#{sum[k]}) #{'=' * sum[k]}" } |
NewerOlder