Ever find yourself on a Mac with a graphic in the clipboard and having the sudden urge to save it directly to disk? Me neither. However, about a year ago, there was a question posed on the Apple-flavored Stack Exchange site: “What’s the quickest way to get a graphic on the clipboard saved to disk?”
Many experienced OS X command-line users will be familiar with
pbpaste, which copies and pastes text from the clipboard (“pasteboard”). What they’re not designed to handle is binary data, such as graphics.
pngpaste is a little ditty I wrote in Objective-C, weighing in at less than 50 lines of code (and mostly whitespace at that) and a Makefile. Installation and usage are pretty straightforward:
$ make && ./pngpaste thefile.png
I submitted my non-winning answer, and promptly forgot about it.
A few months later, I received this in my GitHub inbox:
just wanted to let you know how much your little snippet just rocked my world.
Maybe you know Skitch - a screenshot tool. I’ve always hated that once you clicked on “Upload” you had t wait for it to finish the upload so that you then could click again for copying the URL of the uploaded image to your clipboard. Waste of time, it could be done automatically in background.
Well, thanks to a little bash script, AppleScript and your marvelous little tool I was able to pull it off.
Thanks for making my day! :)
Truly a gentleman and a scholar. The note was wholly unnecessary, and a delight to read – something you don’t expect after a simple hack coded on a whim.
Chances are good that we have all been there: stumbling across a useful code snippet, an informative blog post, an answered question. It might be RVM, it might be Sidekiq, it might be that five year old blog post on how to make Mail.app faster.
Mitchell Hashimoto, the creator of Vagrant, reflected in his post entitled “The Hardest, Most Rewarding Job I’ve Ever Had” upon the long, arduous road leading to Vagrant reaching version 1.0. One moment in particular stood out:
It was here that something big happened: About 15 seconds into the talk, I introduced myself as the creator of Vagrant, in case anyone would recognize me that way. I thought maybe a handful would care, but instead the entire room, filled with around 200 people, erupted in applause, which you can hear in the video. This single act of kindness, again by the community, showed me just how much people cared about what I was doing, and motivated me even further. I consider this an extremely important moment in Vagrant history, and would be the first of many amazing events I’d witness in the following months.
In an era of cheap text messages, quick wall posts and one-click button birthday wishes, make it a point to donate, thank, or send a nice email to the people who have made your life easier. ∪