Home Link

Hello, my name is Brett Terpstra, and it’s nice to meet you. Elegant solutions to complex problems. Curious?

Archive for 2009

Dec 31
2009

Download the Evaluate Expression Snow Leopard service: EvaluateExpressionService.zip

This is a stripped down version of a command I have in the TextMate bundle we use at TUAW. It allows you to select any basic numeric equation and evaluate it, replacing the selected text with the results. It will ignore your text if it contains anything but numbers and basic mathematical symbols. Sure, there are plenty of ways to do calculations in OS X (Spotlight, Launchbar, Quicksilver), but I’ve had more and more incidents lately where I just wanted to do quick calculations inline, so I whipped this up…

Dec 31
2009

I made a couple of minor changes to the Clippable bookmarklet, mostly in the way it handles SyntaxHighlighter code blocks. The SyntaxHighlighter plugin is used (too) often to format and color code source snippets in websites. The result when clipping a page is that the code you get still has line numbers, but no option to view the raw source without going back to the web page. Then you end up manually editing out the line numbers if you want to copy and paste the code, which can be a pain in most cases.

Since the point of Clippable was to deal better with things like code blocks (especially for saving snippets to Evernote), it

Dec 12
2009

Erica Sadun recently released her latest app, Draw (iTunes link), into the wilds of the App Store. I take a special interest in this release because I designed the interface for it from the ground up. Erica, of course, made all of the magic happen; she’d take my photoshop sketches and send them back as amazing working interfaces. In the end, it was a really fun process to go through and Erica was great to work with. Here’s a quick walk-through of the design process.

Dec 12
2009

Well, I’ve been out of touch with a lot of people for the last four days, and I thought I’d save some time and provide a place I could link everyone to for a quick explanation. On Tuesday evening, in the middle of what the weather service is calling our “worst storm in 20 years,” I started having stomach cramps. I won’t go into detail about what followed, but I’ll skip forward to the part where Aditi (my loving and amazingly dedicated wife) packed me into her 4-wheel drive Pathfinder and headed out to Community Memorial Hospital. After a brief survey, I was admitted for observation.

Nov 17
2009

I do a lot in Terminal. Sometimes, it’s easier. Sometimes it’s faster. Sometimes I’d just rather type it out. Whatever the reason, I’ve never been able to stand looking at a boring shell prompt. Bash is my primary shell, mostly because I’ve never taken the time to learn much else. I’ll get there someday. For now, here’s my current Bash shell prompt…

I’m using the […] variable to run a few quick functions to generate the prompt. It doesn’t do anything processor-intensive, so I haven’t seen any lag caused by this one (unlike some of my previous experiments). […] is set to call a function cal

Nov 14
2009

This is a function from my OS X .bash_profile. ‘fk’ is short for Find and Kill, and it lets you do a quick search of your running processes for a case-insensitive partial match of the first parameter passed to it. It’s useful for quickly finding a process without worrying about its capitalization or full spelling, and without having to sift through (or manually grep) a long […] list.

Nov 12
2009

This is a quick and dirty Snow Leopard Service that scrapes Songza​.fm to find a song related to your selected text in most applications. It replaces the selected text with an is​.gd shortened link and the name of the first song it found (just to be sure you’re on the same page… literally). The code is also available as a TextMate command for those interested. Update: TextMate command with link selection popup.

The service (and TextMate command) require the Hpricot gem for ruby. In most cases, this should be installable from the command line with […]…

Entries (RSS) and Comments (RSS).