Skip to content

Instantly share code, notes, and snippets.

@code-later
Created October 14, 2011 13:05
Show Gist options
  • Save code-later/1287041 to your computer and use it in GitHub Desktop.
Save code-later/1287041 to your computer and use it in GitHub Desktop.
Put something in OS X system clipboard from your IRB session
def pbcopy(input)
IO.popen("pbcopy", "r+") do |clipboard|
clipboard << input
end
return input
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment