Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Copy `n Paste from IRB, based on http://judofyr.net/posts/copy-paste-irb.html
# Requires xclip for clipboard interaction. Stick in .irbrc:
def copy(str)
IO.popen('xclip -i', 'w') { |f| f << str.to_s }
end
def paste
`xclip -o`
end
def ep
eval(paste)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment