Skip to content

Instantly share code, notes, and snippets.

@mdusher
Last active July 19, 2018 01:29
Show Gist options
  • Save mdusher/aa78bcb38a642e32ea25d9bf797e0216 to your computer and use it in GitHub Desktop.
Save mdusher/aa78bcb38a642e32ea25d9bf797e0216 to your computer and use it in GitHub Desktop.
safetydance.rb
#!/usr/bin/env ruby
require 'twitter'
client = Twitter::REST::Client.new do |config|
config.consumer_key = "YOUR_CONSUMER_KEY"
config.consumer_secret = "YOUR_CONSUMER_SECRET"
config.access_token = "YOUR_ACCESS_TOKEN"
config.access_token_secret = "YOUR_ACCESS_SECRET"
end
lyrics = [
"Safety!",
"Safety-dance!",
"Ah we can dance if we want to, we can leave your friends behind",
"Cause your friends don't dance and if they don't dance",
"Well they're are no friends of mine",
"I say, we can go where we want to, a place where they will never find",
"And we can act like we come from out of this world",
"Leave the real one far behind,",
"And we can dance",
"We can dance if we want to, we can leave your friends behind",
"Cause your friends don't dance and if they don't dance",
"Well they are no friends of mine",
"I say, we can go where we want to a place where they will never find",
"And we can act like we come from out of this world",
"Leave the real one far behind",
"And we can dance.",
"Dances!",
"Ah we can go when we want to the night is young and so am I",
"And we can dress real neat from our hats to our feet",
"And surprise 'em with the victory cry",
"I say we can act if want to if we don't nobody will",
"And you can act real rude and totally removed",
"And I can act like an imbecile",
"I say we can dance, we can dance everything out control",
"We can dance, we can dance we're doing it wall to wall",
"We can dance, we can dance everybody look at your hands",
"We can dance, we can dance everybody takin' the chance",
"Safety dance",
"Oh well the safety dance",
"Ah yes the safety dance",
"Safety",
"Safety-dance",
"We can dance if we want to, we've got all your life and mine",
"As long as we abuse it, never gonna lose it",
"Everything'll work out right",
"I say, we can dance if we want to we can leave your friends behind",
"Cause your friends don't dance and if they don't dance",
"Well they're are no friends of mine",
"I say we can dance, we can dance everything out of control",
"We can dance, we can dance we're doing it wall to wall",
"We can dance, we can dance everybody look at your hands",
"We can dance, we can dance everybody's takin' the chance",
"Oh well the safety dance",
"Ah yes the safety dance",
"Oh well the safety dance",
"Oh well the safety dance",
"Oh yes the safety dance",
"Oh the safety dance yeah",
"Oh it's the safety dance",
"It's the safety dance",
"Well it's the safety dance",
"Oh it's the safety dance",
"Oh it's the safety dance",
"Oh it's the safety dance",
"Oh it's the safety dance"
]
loop do
lyrics.each do |line|
client.update line
puts "Tweeted: #{line}"
sleep 10800 # 3 hours
end
end
@MacsInSpace
Copy link

brilliant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment