Skip to content

Instantly share code, notes, and snippets.

@jaymcgavren
Created June 22, 2009 01:17
Show Gist options
  • Save jaymcgavren/133751 to your computer and use it in GitHub Desktop.
Save jaymcgavren/133751 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
input = STDIN.isatty ? nil : STDIN.read
if input
IO.popen('pbcopy', 'w').print(input)
else
puts `pbpaste`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment