Home Link

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

Archive for the ‘Code’ Category

Dec 21
2011

I finally got around to writing a script to auto-generate the documentation for my DefaultKeyBinding.dict file. The script now reads my comments in the file and creates tables of keystrokes and descriptions ready for GitHub. From now on, my fickle changes will be reflected in the readme​.md file in the repo and the keystrokes will stay current. You can see the current output here.

Dec 04
2011

I just stumbled upon another keybinding tip from Jacob Rus. It allows you to enter a numeric string before running a text command and repeat the command the specified number of times. Emacs and Vim do it… turns out that any Cocoa text field can, too. The tip is from 2006, so this is old news, but still new to me.

Nov 21
2011

I just added a pull request for my latest Dropzone (review) Destination. It’s called “Open URLs,” and with it you can open text urls from any number of text files, drag text straight from any application, or just click it to scan your clipboard. The files, text or clipboard contents are scanned for any http(s) links and they’re sent to your default browser using the system open command.

Nov 15
2011

As the next part in the keybindings series I’m demonstrating some improvements I’ve made to the original “surround” commands since my first time around. This set of commands is designed to wrap selected text in a variety of paired characters. The keys are the same, but the commands now work inside of single-line text fields (like you often find in Safari), prevent auto-pairing in…

Nov 14
2011

Thus far, Marked has had a great reception and has, overall, worked superbly with a wide range of text editors. I frequently get requests for integration with more complex editors, but have been unable to fulfill them because Marked requires an actual text file to watch. To try and fix this situation, I’ve been scripting “watchers” for various applications which embed their files…

Nov 10
2011

If you’ve poked around this blog at all, you know I dig System Services and TextExpander snippets more than is probably healthy. I have a new obsession, though, and it’s been taking up a lot of my playtime. Welcome to part two of (what is now) an ongoing series about Mac OS X Key Bindings. Originally inspired by Lauri Ranta, I’ve come to believe that system-wide keybindings for…

Nov 09
2011

This next geeklet is quite similar to the Top CPU Processes geeklet I last shared. It finds the apps and processes with the biggest memory footprint on your system and lists the top 10. The output looks like:

It includes system-level processes, too, so you can see if something other than your running apps is taking up RAM. Keep in mind that RAM is meant to be used, and having it…

Entries (RSS) and Comments (RSS), or Subscribe by Email