Last active
January 2, 2016 07:39
-
-
Save andrei512/8271252 to your computer and use it in GitHub Desktop.
the ubiquitous ruby hack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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