Skip to content

Instantly share code, notes, and snippets.

@taiyoh
Created Aug 14, 2013
Embed
What would you like to do?
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