Archive for the ‘Visual Elements’ Category
Posted on November 10th, 2008 by Ray Baxter (2) Comments
“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:
- Modify each application’s Info.plist CFBundleExecutable to point to a shell script inside the application’s bundle
- Create the appropriate shell script that runs ./firefox-bin -P profile-name in each bundle.
- 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 (Firefox.app => Firefox3.app), 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: http://github.com/yesteray/firefoxen/tree
Here’s a screen grab:
Posted on September 9th, 2008 by Ray Baxter No 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:
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 »
Posted on August 20th, 2007 by Ray Baxter No Comments
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.
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:
The xpath expression,
#xpath(//p), identifies the relevant paragraph on the referenced page that will be included into you page.
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.
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.
Posted on June 5th, 2007 by Ray Baxter No 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.
- Fix a Typo, Go to Rails
- Embedding Private and Shared Calendars – Google Apps for Your Domain
- Embedding Private and Shared Google Calendars
- Restyle Google Calendar
- Single Purpose Web Dev Browser
- Getting to know the Atom Publishing Protocol, Part 1: Create and edit Web resources with the Atom Publishing Protocol
- Getting to know the Atom Publishing Protocol, Part 2: Put the Atom Publishing Protocol (APP) to work
Date and Time
- Articles and Tutorials
- Bugs and Enhancements
- Calendar API FAQ
- Calendar Feeds
- Developer’s Guide
- Google Calendar Data API Group
- Reference Guide
- Batch Processing
- Client Libraries
- Common Elements
- Protocol Basics
- Protocol Reference
- Zend Documentation
- 30 Boxes
- CalendarHub – Web Calendars
- Google Calendar
- Online calendar publishing: Google Calendar
- Online calendar publishing: iCal
- Online calendar publishing: Outlook
- The Human Calendar
- Yahoo! Calendar