Send contents of file to clipboard (.app)
by brian hefele

This is nothing really exciting, but I've been meaning to whip this up for a while now. Since I maintain a handful of different resumes, and I paste a plaintext version in with any given cover letter I email out (providing a link to the PDF), my typical workflow is opening the file in Vim and copying and pasting the contents into mail. Occasionally, I also just go to the command line, using cat to stuff the file right into pbcopy. But when I'm writing a cover letter in Mail, there's a good chance my brain is already in GUI mode and I'd be better off just lazily ambling to the Finder. So with that in mind, I have wrapped up the line

cat $1 | pbcopy

into an application package using DuckBill, to make a tiny little application which can be placed in the Finder toolbar, waiting for plaintext to be dropped on it and copied to the pasteboard. Right now there's just a generic icon in place, and it doesn't check to make sure $1 is null (that is, clicking it rather than dropping a file on it clears out the pasteboard entirely). But it will save me some energy, and maybe others as well. I'll continue to work on it (to address the above two issues, for example) but right now, it does what it does, and it can be downloaded here.

Update! Of course, that should have been

cat "$@" | pbcopy

…yikes! Well, I was tipsy when I threw it together last night. I'm tipsy again tonight, but I think I fixed that major oversight, at least. New version is up (still here).

categories: software, code
date: 2010-09-17 00:14:19

SCorCh - Simple Correspondence Chess
by brian hefele

I've thought a lot in the past about correspondence chess, and the current state of such. There are a number of online solutions, most of them not so great. Twitter-based ChessTweets is my current favorite solution (anyone who wants a fight, @brhfl) although the constant barrage of DMs from the system does get somewhat irritating. I use the somewhat clumsy XBoard with a variety of engines for the sake of analysis, but using it for correspondence is far from ideal. This task seems the perfect opportunity to demonstrate that less is more, and create a CLI interface which acts as a somewhat dumb client for displaying a board and interpreting moves. While I will probably never actually code this, I hope that perhaps I will some day, and I will call it scorch for Simple Correspondence Chess.

Continue reading…

categories: code, gaming, software, chess
date: 2010-07-20 18:03:32

Happy Belated Birthday, Alan Turing
by brian hefele

(The late) Alan Turing's birthday was yesterday, and I meant to write this post yesterday, but I didn't, so here it is now. Anyone with an interest in computing (note: not computers) already knows everything there is to know about Turing, but for everyone else, here's a little background. Turing was a mathematician (among other things). At the time (let's say late 1920s through 1954), there weren't computer scientists, because there weren't computers, not as we know them. There was a lot of math, though, and one way to help formulate a proof, help work through an algorithm or a complex mathematical function is by having some sort of device to help you.

Continue reading…

categories: computing, code, software
date: 2010-06-24 17:04:29