Skip to content

Instantly share code, notes, and snippets.

@masarakki
Created October 22, 2011 08:21
Show Gist options
  • Save masarakki/1305777 to your computer and use it in GitHub Desktop.
Save masarakki/1305777 to your computer and use it in GitHub Desktop.
earthquake plugin for simple QT and RT
Earthquake.init do
command %r|^:qt\s+(\d+)\s+(.*)$|, :as => :qt do |m|
target = twitter.status(m[1])
text = "#{m[2]} QT @#{target["user"]["screen_name"]}: #{target["text"]}"
if confirm("QT '#{text}'")
async_e { twitter.update(text) }
end
end
command %r|^:rt\s+(\d+)$|, :as => :rt do |m|
input ":retweet #{m[1]}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment