Skip to content

Instantly share code, notes, and snippets.

@andrei512
Last active January 2, 2016 07:39
Show Gist options
  • Save andrei512/8271252 to your computer and use it in GitHub Desktop.
Save andrei512/8271252 to your computer and use it in GitHub Desktop.
the ubiquitous ruby hack
#!/usr/bin/env ruby
clipboard = `pbpaste`
begin
output = eval(clipboard)
`echo #{output} | pbcopy`
rescue Exception => e
# silence exception
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment