My Custom GeekTool 2 Build with Support for ANSI Colors, UTF-8 and Different Writing Directions
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.
Quick, Declarative UML Sequence Diagrams
Posted on June 4, 2009
Filed under jEdit, Scripts
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.
Markdown and POD Syntax Highlighting Modes for jEdit
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.
Quick Look Plugin/Generator for Image Folders
Posted on March 27, 2009
Filed under Mac, Programming
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.
Opening a Bunch of Stuff at Once on Your Mac
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.
fcshctl: the Flex Compiler Shell Controller
Posted on November 3, 2008
Filed under ActionScript 3, Flex, jEdit, Programming, Scripts
Introduction
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.
- Display a “compiling…” message before sending fcsh a compilation command in order to let the user know that something is going on and that they should wait instead of just killing the process.
- If the log file exists when fcshctl runs, check if there are any other fcshctl instances running, and if not, assume that the log file has been orphaned, delete it and continue.
- Exit with status code 0 (“ok”) if fcsh output ends in the “Nothing has changed since the last compile” message.
Saving and Accessing Version/Compilation Information with Flex Applications
Posted on September 29, 2008
Filed under ActionScript 3, Flex, Programming
On several occasions while developing Flash applications I’ve run into problems with proxy/cache servers. The pattern is usually something like this:
- I notice a bug in an application that only occurs when running it on the server
- I debug the application, find the bug and issue a fix
- I deploy the new version that contains the fix onto the server
- I empty the browser cache and run the app on the server again, noticing that the bug seems to persist
- I wonder if the version I’m seeing is indeed the version that has the fix, or an older build served to me by some cache server between my workstation and the server
- I have to resort to stupid trickery (comparing md5 hashes of .swfs or something) in order to find out
Gmail Backups with fetchmail on OS X
Posted on August 14, 2008
Filed under Featured, Mac, Scripts
I use GMail as my personal email provider, and as much as I like the simple and snappy UI, the conversation views and the filtering and search possibilities, I’ve grown more and more worried about having all of my (important) mails stored on someone else’s servers. Now, out of all of the big IT companies in the world I’d say I trust Google a heck of a lot more than anyone else, but this doesn’t mean that I shouldn’t take into consideration the possibility of something going wrong on their end and as a result some (or Bob forbid, all) of my mails disappearing into bit heaven.
The good news is that Google provides a nice, standard POP3 interface for downloading emails from their service, and all of the software required for downloading messages via POP is already installed in Mac OS X Leopard by default. Below I’ll go through all of the steps it took me to set up periodical and automated GMail backups on my Macbook.
Quick File Tagging in OS X with Punakea (& Tagger)
Posted on June 26, 2008
Filed under Miscallaneous
Even though I am a little pedantic in some ways (like most engineers are, I suppose,) I always seem to have trouble organizing the files on my computer(s) with any kind of reasonable folder structure or naming convention. I often find myself desperately trying to find a specific file that I know I have somewhere but I’m not sure where, and sometimes I just want to find a bunch of files that are somehow related but not actually saved into the same folder. These are problems that tagging is trying to solve (and doing a reasonably good job at it, I might add.)
icalBuddy: Getting Events and Tasks from the OS X Calendar Store via the Command Line
Posted on June 20, 2008
Filed under Mac, Programming
I’m a big fan of the “do not repeat yourself” principle, which, especially in the context of software, basically means that you should only have one place to change anything. Any highly volatile data that will be viewed from more than one location (or in more than one way) should only have one location and/or interface for changing it. This way, whenever someone, somewhere, at some point in time happens to make changes to that data, all of the views that display it will reflect that change in true MVC fashion. The calendar store in OS X is a nice centralized database for calendar data that allows me to practice this principle when it comes to my calendars, and I’ve been very happy with it, given that I’ve also gotten automated synchronization with my cell phone to work.
I used dashboard widgets for a while for getting a quick overview of all of the events I have planned for the day plus any uncompleted tasks I might have, but soon noticed that I don’t actually go and see what’s up in the dashboard very often, which lead to me forgetting some things even though I had them set up as events or tasks in my calendars. The perfect place for displaying events for the day and any uncompleted tasks for me would thus be the desktop, which, even though it is most of the time obscured by a bunch of windows, I’ll occasionally glance at during the day. GeekTool is the solution for displaying any textual output from the shell on an OS X desktop, and I was using that already for some other things, so all that I needed was a CLI application or script that would get the events and tasks from the calendar store and output them in a nice readable way.
« Newer Posts — Earlier Posts »