Skip to content

Instantly share code, notes, and snippets.

@james
Last active December 16, 2015 22:39
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 james/5508572 to your computer and use it in GitHub Desktop.
Save james/5508572 to your computer and use it in GitHub Desktop.
require 'twitter'
Twitter.configure do |config|
config.consumer_key = YOUR_CONSUMER_KEY
config.consumer_secret = YOUR_CONSUMER_SECRET
config.oauth_token = YOUR_OAUTH_TOKEN
config.oauth_token_secret = YOUR_OAUTH_TOKEN_SECRET
end
s = nil
while true
if IO.popen('pbpaste', 'r+').read != s
s = IO.popen('pbpaste', 'r+').read
Twitter.update(s)
end
sleep 5
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment