Archive for the ‘Visual Elements’ Category

Running Multiple Versions of Firefox

Posted on timeNovember 10th, 2008 by userRay Baxter    flag(2) Comments

A question:

“I want to create a custom launcher for Firefox 2 and Firefox 3 with different profiles. Perhaps the real question is how do we create a custom version of a Mac application launcher, passing in the arguments we need?”

… without having to invoke it on the command line every time.

Mac OS X is assumed.

Firefoxen is an answer in code. It’s a script to automatically configure multiple installations of Firefox so that they open with different profiles. The script encapsulates what I needed to do to figure out how to solve this problem.

The steps are:

  1. Modify each application’s Info.plist CFBundleExecutable to point to a shell script inside the application’s bundle
  2. Create the appropriate shell script that runs ./firefox-bin -P profile-name in each bundle.
  3. Reregister the application’s bundle with launchservices so that the changes are picked up. Normally they are cached.

Only the last of these took too longer to figure out. You can trigger an update of launchservices by renaming the application bundle ( =>, but if you rename it back it seems to revert to the previous db entry. (Cached by application name?)

Unfortunately, you can’t combine 1 and 2 either. I tried multiple permutations on changing the CFBundleExecutable parameter in each bundle from the default firefox-bin to something like firefox-bin -P versioned-profile but I couldn’t make it work with any amount of quoting.

Git it here:

Here’s a screen grab:

Running 4 versions of Firefox.

Running 4 versions of Firefox.


Q & A – Sharing Calendars

Posted on timeSeptember 9th, 2008 by userRay Baxter    flagNo Comments

This is a little out of my normal area here, but I received this question in my email and I figured I’d answer it here for everyone’s future reference. Maybe I’ll become the next “Ask Dave“?

On Sep 9, 2008, at 9:05 AM, nadine wrote:
Dear Ray,

I do hope you don’t mind my email you… I am desperate!!!

I work for a gentleman who in turn works for 6 different companies. Because his calendar entries need to be colour coded I have obviously set up a calendar representing each different company which shows a different colour. This works fine between he and I.

However, he would like to share his calendar with a number of colleagues. Do I firstly have to ask each of his colleagues to open a Google account and then do I send an invite to them? However, I think this invites them only to his one calendar and not to all the associated company calendars?
Read the rest of this entry »


Purple Include

Posted on timeAugust 20th, 2007 by userRay Baxter    flagNo Comments

Brad Neuberg has worked up a new release of the Purple Include tool that came out of the Hyperscope project. Brad’s description is here.

Basically Purple Include is a mechanism for including the content of other web pages (local or remote) in the body of your page. Here are a couple of examples. Here is a paragraph from a post of mine about Jane Jacob’s work:

Here are two bullet points from the forgotten wisdom of Donald Rumsfeld:

There are three elements of Purple Include.

  1. Markup that you add your page. Depending on what you are trying to do, you add a p, blockquote, q, pre, div, or span element with an href attribute.
    The first blockquote above came from this:

    <blockquote href="[6])"></blockquote>

    The xpath expression, #xpath(//p[6]), identifies the relevant paragraph on the referenced page that will be included into you page.

  2. A javascript that you add to your page.

    <script src=""></script>

    As you can see, Brad is hosting this script on his site, for rapid development and improvements.

    On load, this java script pulls the marked up elements from your page and makes a call to a service that Brad is running to fetch the content to be included on your page. The script inserts this content into the inner html of the element.

    The content is of the class .included and .includeok. I have styled .included in the dark gray that you see instead of the normal silver that I am using for blockquotes, so you can see the change in color as the content is inserted.

  3. Brad is running the service that the javascript calls. This service is doing the xpath queries on the content of the referenced page to get the returned content.

This is an interesting design. When I read about it, the first thing that I thought about was caching of the content. In my examples, I referenced my own pages, as Brad referenced his in his examples. I am sure that if you can read these pages, then Brad’s service can read the referenced pages. I’m probably not going to change the pages that I referenced, but I could.

This could be either a good thing, or a bad thing depending on your purposes. The bad is that the exact elements on a page are subject to change. The sixth paragraph of my Jacob’s post could become the seventh or the fifth if I changed blog templates, or fixed a typo in the post. When including content from another site, all bets are off. Also, the remote server could be off line or inaccessible. Brad could add a cache to his service so that any given xpath element of a referenced url from a specific referrer would return the cached result. There would need to be some way to clear the cache, but see below.

On the other hand, this could be just what you want. This is a way to add dynamic content directly to your page, and you don’t need to worry about updating. For many purposes, having a remote server off line isn’t that big a deal and you are likely to be dealing with more fixed markup than I see on my blog pages. A properly scoped xpath query could pull out exactly what you want from most sites.

A couple of other little things that I came across while playing with this.

You can’t include the same exact url (including xpath parameters) twice. The script uses a hash to map from urls to elements. The server returns the content, the url, and an error and looks up the element in the hash by url. Here is the first of Rumsfeld’s pithy sayings from above:

And here it is again:

Only the second appears; the first is just the roller gif. (You can also see that the styling is different.) This is a bug, or at least an unanticipated use case. You can work around by referring to a non-existent query parameter, so urls







Finally, the href attribute isn’t valid with any of p, blockquote, q, pre, div, or span in either html 4 or xhtml. This page is invalid.


Marcus Bains Line

Posted on timeJune 5th, 2007 by userRay Baxter    flagNo Comments

A useful visual element that can be added to an online calendar is the Marcus Bains Line. Here is a reference and an example.

The line indicates the current time on a daily calendar.



Recent Posts


Relevant Links


Date and Time



iCalendar Tools

Online Calendars




Zend GData