When implementing the feature in the icalBuddy examples page where the font used for the output examples could be changed interactively I needed to get a list of all the fonts installed on the current user’s computer. This blog post from 2006 explains how to do it, but it refers to the deprecated ActionScript 2 API so I had to figure out how to do it with AS3.
A few minutes ago I clicked on an iTunes store link on a website and had to again completely lose it because of the iTunes app popping up without me asking it to. This is a common annoyance that people have found a bunch of different ways to combat, ranging from messing with the system’s (or the browser’s) mapping of URL protocol handlers to rewriting parts of web pages via a browser plugin (e.g. GreaseMonkey) or a localhost web proxy (e.g. GlimmerBlocker).
I spend a lot of time in the Terminal on my computer — a lot of things are just better done with a command-line interface than in the GUI. When removing files via the command-line people usually just, well, remove them (with the rm command), but this means that they’ll be eschewing the Trash, one of the user-friendliest things (even relatively) modern operating systems have had to offer for a long time.
Even though I curse and hate its syntax, I have to admit that AppleScript certainly provides one of the nicest things OS X has to offer in comparison to other operating systems: almost-ubiquitous scripting of GUI applications (one could argue that this is not due to the AppleScript language itself, but the Open Scripting Architecture which AppleScript is simply a language for, but that’s just semantics). Recently I’ve had to work with AppleScript files a bit more than usual while implementing Tagger‘s front app scripts feature, and I noticed that I often wanted to print out the contents of (compiled) AppleScript files in the Terminal. The built-in command osadecompile does just that: it reads in the AppleScript file, decompiles it, formats the code and nicely prints it out. I’m used to seeing my code with syntax highlighting, though, so I decided to write a small program that works similarly to osadecompile but uses ANSI escape sequences to format the output.
Posted on July 8, 2009
Filed under Mac
A year ago I released version 1.0.8 of my icalBuddy command-line application that I initially wrote as a way to get nicely formatted lists of my events and tasks from the OS X calendar store on top of my desktop background picture using GeekTool. This particular version was notable in my mind because it introduced initial support for formatting the output via ANSI escape sequences. The initial formatting was static (that is, you couldn’t change it) and very simple (it only made the titles bold), but since then I’ve implemented all kinds of different customization options that can be used to specify how the output should be colored and otherwise formatted. The only problem was that GeekTool didn’t support ANSI escape sequences, which meant that instead of the nicely formatted output I wanted GeekTool would display a bunch of gibberish if I used the -f icalBuddy argument.
I recently had to create a few UML sequence diagrams, and I decided that I didn’t want to spend too much time manually tweaking and fixing the diagrams themselves (which is what I probably would’ve done, had I used OmniGraffle or something similar), but instead focus on the content — the depicted workflow itself. This is when I remembered the bookmark I had in my browser for the Web Sequence Diagrams online service.
Posted on April 21, 2009
Filed under jEdit
In The Pragmatic Programmer¹, the authors Andrew Hunt and David Thomas empasize the power of plain text, as well as “generators” that take the canonical form of some document and generate different representations of it. This is very much in line with the way I like to work with a lot of documents, which is why I’ve been using the Markdown and POD (Plain Old Documentation) syntaxes for a couple of things. As jEdit is the editor I prefer to use for working with most plain-text formats, I wrote highlighting modes for it for these two syntaxes.
One of the things that I’ve always thought Windows XP did better than OS X is how it displays the thumbnails of contained images on the icons of folders that have image files inside them. I always felt this to be quite useful, but couldn’t think of any reasonable way to implement it on the Mac before OS X Leopard came along with its Quick Look plug-in architecture.
Posted on February 20, 2009
Filed under Mac
Every day when I come to work, I have a bunch of applications, files and web pages I need to open in order to get started. These are almost always the same, though with a little variation (for example, sometimes if I need to do something that requires a lot of concentration I might want to leave Adium, my instant messenger app, closed.) Now, let’s face it — opening a bunch of applications, files and web pages is not a lot of work: you just clickety-click on several icons on your Dock or Desktop, then switch to your web browser (after it’s loaded, of course) and click on some bookmarks in your bookmark bar or menu. But the problem is that I’m lazy and I hate having to do any repetitive work.
Like I’ve mentioned before in this blog, I develop Flex applications using the Flex SDK and jEdit instead of Adobe’s Flex Builder IDE. This setup has worked very well for me but one annoying issue I’ve had to deal with because of this is the slow compilation speed: every time I make a small change into one of my projects and recompile it, the mxmlc compiler (that my build scripts are calling) has to load the JVM into memory and recompile my whole project from scratch, which obviously takes a while. Compiling things in Flex Builder is a lot faster, and the reason for that is the Flex Compiler Shell, which it uses for compilation instead of mxmlc.
« Newer Posts — Earlier Posts »