Created
July 8, 2014 19:20
-
-
Save ckolderup/998c58bba94a8bb71302 to your computer and use it in GitHub Desktop.
drilsay - make your OS X install read wint to you whenever he tweets
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 'tweetstream' | |
TweetStream.configure do |config| | |
config.consumer_key = ENV['TWITTER_OAUTH_KEY'] | |
config.consumer_secret = ENV['TWITTER_OAUTH_SECRET'] | |
config.auth_method = :oauth | |
end | |
TweetStream::Client.new.follow(16298441) do |status| | |
puts status.text | |
`echo "#{status.text}" | say -v Ralph` | |
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
source 'https://rubygems.org' | |
gem 'tweetstream' | |
gem 'foreman' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
put the environment variables in .env and
rbenv exec bundle exec foreman run ruby drilsay.rb