Skip to content

Instantly share code, notes, and snippets.

@kaosf
Created January 11, 2017 10:24
Show Gist options
  • Save kaosf/8d0b3954be705e8c31e65a94ba1a124b to your computer and use it in GitHub Desktop.
Save kaosf/8d0b3954be705e8c31e65a94ba1a124b to your computer and use it in GitHub Desktop.
Earthquake.init do
command :y do |m|
target = twitter.status(m[1])
url = "https://twitter.com/#{target["user"]["screen_name"]}/status/#{target["id"]}"
system("echo -n #{url} | xsel -ib")
puts "Yank \"#{url}\"."
#system("tmux set-buffer #{url}")
#puts "Set \"#{url}\" to tmux buffer"
end
help :y, 'Yank', 'Yank tweet URL'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment