Posts tagged: PROGRAMMING

TextMate command for paste.e-scribe.com

After seeing a similar offering from the Web 2.0 pastebin Attachr I couldn’t resist. So here’s a simple TextMate command that submits selected text to paste.e-scribe.com, opening the new URL in your default web browser. Bonus features: the filename is used as the title, and the language syntax is guessed from the file extension.

This is a very crude little script, but too much fun not to share. Download paste.tmCommand.zip and double-click the resulting .tmCommand file, that should be all there is to it.

Pastebin update: Pygments

This past spring I posted about a simple pastebin app I wrote using Django. This week I updated it to use the excellent Pygments syntax-coloring library (formerly known as Pykleur).

Pygments has support for a healthy number of languages/syntaxes, offers a great deal of flexibility, ships with several different color schemes, and can produce output in HTML/CSS, LaTEX, or ANSI terminal colors. I created a “pcat” alias to take advantage of that last one when working in the shell.

Quotation punctuation evolution

With English teachers for parents and a degree in literature, I’ve always felt a certain burden to uphold consistent, proper English usage. Over the past few years, though, one of the firm rules that I learned in my younger days – that commas and periods go inside quotation marks – has become impossible for me to follow.

This is an American rule, one that is mostly, if not entirely, about typographic appearance. If you place a comma or a period after the closing quotation mark, it’s kind of floating there in space. Placed before, it’s nestled tidily against the preceding letter. The American use of double-quotes intead of single makes this contrast even more dramatic.

International Freedom From Stupid Software Patents Day

LZW – that is, the formerly patented Lempel-Ziv Welch compression algorithm – is free today. The footnote on the Free Software Foundation’s GIF history page says:

The Unisys patent expired on 20 June 2003 in the USA, in Europe it expired on 18 June 2004, in Japan the patent expired on 20 June 2004 and in Canada it expired on 7 July 2004. The U.S. IBM patent expired 11 August 2006, The Software Freedom Law Center says that after 1 October 2006, there will be no significant patent claims interfering with employment of the GIF format.