On windows I used to the time when I wanted some output (from a file or command) in the clipboard.
> tracert www.dn.se | clip
> type data.txt | clip
And then I went of and pasted it somewhere.
Haven’t been using it on mac but today I needed it. So after googling around I found pbcopy.
> cat redis-trottle.js | pbcopy
And Bob’s your uncle!