Skip to content

Instantly share code, notes, and snippets.

require 'rubygems'
require 'twitter'
require 'ruby-growl'
last_tweet_id = 0
loop do
result = Twitter::Search.new('teachmetocode').since(last_tweet_id).fetch().results.first
if result
from_user = result[:from_user]
@why404
why404 / tinyurl.rb
Created October 27, 2009 16:05 — forked from woods/tinyurl.rb
#!/usr/bin/env ruby
#
# A complete URL-shortening web application, written in Ruby/Sinatra. Run it
# from the command line, and then visit http://localhost:4567/
#
# Or to run it under apache/passenger, you'll need a config.ru file with the
# following contents:
#
# require 'tinyurl'
# run Sinatra::Application