Skip to content

Instantly share code, notes, and snippets.

@stve
Created September 24, 2010 04:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stve/594848 to your computer and use it in GitHub Desktop.
Save stve/594848 to your computer and use it in GitHub Desktop.
source "http://rubygems.org"
gem 'tweetstream'
gem 'yajl-ruby'
gem 'growl'
require 'rubygems'
require 'yajl'
require 'tweetstream'
require 'growl'
username = 'username'
password = 'password'
twitter_logo = File.join(File.expand_path(File.dirname(__FILE__)), 'twitter.png')
keywords = %w(yankees rays)
TweetStream::Client.new(username, password, :yajl).track(*keywords) do |status|
Growl.notify do |n|
n.message = status.text
n.title = status.user.screen_name
n.image = twitter_logo
end if Growl.installed?
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment