Skip to content

Instantly share code, notes, and snippets.

@daneharrigan
Created April 15, 2010 01:53
Show Gist options
  • Save daneharrigan/366591 to your computer and use it in GitHub Desktop.
Save daneharrigan/366591 to your computer and use it in GitHub Desktop.
require 'rubygems'
path = File.expand_path( File.dirname(__FILE__) )
$LOAD_PATH << "#{path}/gems"
require 'yaml'
require 'twitter'
config = YAML.load_file("#{path}/.config")['twitter']
httpauth = Twitter::HTTPAuth.new(config['screen_name'], config['secret'])
base = Twitter::Base.new(httpauth)
tweets = ['Just my dreamhost contest update',
'Will I win an iPad, dreamhost?',
'Sorry guys, another dreamhost tweet',
'Again with the dreamhost tweet',
'Just trying to win an iPad... dreamhost :-)',
'Anyone that didnt notice dreamhost is giving out iPads: http://bit.ly/8Z6l3u',
"Don't hate me guys ;-) dreamhost",
"Did dreamhost get their iPads yet?",
"Almost forgot... dreamhost ;-)",
"And... dreamhost"]
index = rand(tweets.count)-1
rand = 0 if index < 0
base.update(tweets[index])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment