Skip to content

Instantly share code, notes, and snippets.

@happyrobots
Created February 19, 2012 10:17
Show Gist options
  • Save happyrobots/1862963 to your computer and use it in GitHub Desktop.
Save happyrobots/1862963 to your computer and use it in GitHub Desktop.
Copy to Clipboard Using Ruby
# Mac
IO.popen('pbcopy', 'r+') { |clipboard| clipboard.puts html_out }
# Linux
IO.popen(’xsel –clipboard –input’, ‘r+’) { |clipboard| clipboard.puts html_out }
@Victorcorcos
Copy link

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment