Bits and Pieces

About G+ GitHub Twitter Google Developer Group Silicon Valley Meetup The Bay Area Chef User Group Bay Area Infracoders Docker Palo Alto

18 Aug 2014
Mac OSX - pbcopy and pbpaste

One of the small but helpful tools that Mac OS X provides are pbcopy and pbpaste. They provide copying and pasting to the pasteboard (the Clipboard) from the command line.

So you can pipe your massive json file onto the pastboard with a simple command:

cat huge.json | pbcopy

Now you have it in the pasteboard (clipboard) and paste it in your favorite json lint site - like JsonLint or FREEFORMATTER.COM. Another site I was just recently introduced to is the Collapsible JSON Formatter.

One way I use pbpaste is when copying keys created on websites. After I copied the key to the pasteboard I will run the command: pbpaste > keyfile.pem

That’s it.


Til next time,
E.E at 18:06

About G+ GitHub Twitter Google Developer Group Silicon Valley Meetup The Bay Area Chef User Group Bay Area Infracoders Docker Palo Alto