Skip to content

Instantly share code, notes, and snippets.

@taiyoh
Created August 14, 2013 05:10
Show Gist options
  • Save taiyoh/6228180 to your computer and use it in GitHub Desktop.
Save taiyoh/6228180 to your computer and use it in GitHub Desktop.
Earthquake.init do
command :url_show do |m|
url = case m[1]
when /^\d+$/
"https://twitter.com/#{twitter.status(m[1])['user']['screen_name']}/status/#{m[1]}"
else
"https://twitter.com/#{m[1][/[^'"]+/]}"
end
ap url
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment