Access OS X keychain from Terminal
At everyday scripting, you often need to access sensible information like passwords. A common practice is to just write them plain text into your script, but at least on a Mac, we can do better. OS X ships with a tool called keychain. It is a central database where tools can store sensitive information like [...]
How to patch binary files with Java
Recently, I wanted to create an “intelligent” binary patcher, which not only replaces some chunk of binary data at a file’s predefined offset, but instead performs search and replace. Here is the Java class I came up with. import java.io.*; import java.math.BigInteger; public class BinaryPatcher { private String content; private final String filename; private final [...]
Robust HTML parsing the Groovy way
With Groovy, it’s very easy to parse XML data and extract arbitrary information. This works great as long as the input data is well-formed, but you can’t always guarantee that in real-world scenarios. Think of extracting data from HTML pages. They are very often a mess when it comes to XML validity and that’s where [...]
WordPress Plugin SyntaxHL-Editor officially released
I’m proud to announce the official release of my first WordPress plugin: SyntaxHL-Editor. It offers an easy to use graphical user interface for Syntax Highlighter and Code Colorizer for WordPress. You can easily enter and modify source-code highlighted in your posts as well as specify options for every single snippet. The plugin is also hosted at [...]
Make Time Machine backups bootable
Time Machine is a great backup application shipped with Mac OS X Leopard and Snow Leopard. You can either restore single files in your running OS X or do a full system restore by booting the OS X install DVD. Using the latter method, it would be nice to boot directly from your backup drive [...]
Using WordPress as URL redirection service
Redirection is a WordPress plugin that let’s you add URL redirections to your blog. This is very useful if the addess of some or even all of your blog posts changed. The setup is straight forward: just enter source and target URL and the redirection is set up. The more advanced users can even add redirections [...]
Logitech G5 Laser mouse on Mac OS X (updated)
I recently bought Logitech’s G5 Laser mouse. It’s meant to be a gamer mouse but is also great for daily work. The only problem for us OSX users is that Logitech in contrast to most of its devices doesn’t offer drivers. The mouse works just fine out of the box without any proprietary driver, but [...]
My Top 3 Finder Toolbar Scripts
With Leopard’s Finder, you can not only add applications to the toolbar, but also scripts. That’s an extremely useful feature I use every day and so I put together an introduction to my favorite three. But let’s first talk about the installation. That’s pretty easy. Just extract the downloaded archive, copy the script to an [...]
Batch renaming files in shell
Did you ever have to rename a lot of files using a similar pattern? And did you end up sitting in front of Finder or whatever your favorite file manager is and stripped of a certain prefix from the file-name or changed the extension? Well, I did. But as long as you have a terminal [...]
