Transferring Firefox profiles
I just installed the latest version of Firefox 3 on a fresh Leopard partition. The copy of Firefox on my Windows desktop has all my bookmarks and saved passwords. I originally thought of only transferring the bookmarks to the Firefox on Mac, but I experimented with copying the entire profile folder over. Nothing to lose!


I copied only the contents of the original profile .default folder, emptying and replacing the Firefox profile folder on my Mac. Opening Firefox on my Mac immediately gave me the familiar state of the Firefox on my Windows, exactly as I had it (before I transferred). All my saved passwords, searches, and history are also there as well!
Will report any issues but everything works great so far.
Staying up late
I know too many people who struggle to stay up late at night, with the only reason being that it is “not time to sleep yet”. Flipping through re-runs on tv, surfing aimlessly on the web, or playing Flash games.
Sleeping late means waking up late. Or a nap or two during the day.
Why not sleep early, and wake up early? You can watch your re-runs and surf the internet in the morning. Or you can do anything you want. Chances are you will have more options at 8 am than at 1 am.
When I see search boxes I am often wondering which search parameters to enter. Am I searching for users of this site, or searching for content?
In comes help tips to the rescue! Help text placeholders are used often on search text boxes, but also on inputs which ask for a URL (eg. to remind users to prefix the link with http://).

or:

Here’s an simple function to do this using JavaScript:
1 2 3 4 5 6 7 8 9 10 | function ToggleDefaultHelpText(obj, helptext, isFocus) { var curr = obj.value.replace(/^\s+|\s+$/g, '') ; // trim the text box's value var isEmpty = (curr.length < 1 || curr == helptext); obj.style.color = (isFocus) ? "#000000" : (isEmpty) ? "#999999" : "#000000"; if (isFocus) obj.value = (isEmpty) ? "" : curr; else obj.value = (isEmpty) ? helptext : curr; } |
You will want your text box’s default state to be the same as the blur state, so execute the function with isFocus = false.
1 2 | <input type="text" id="myTextBox" onfocus="javascript:ToggleDefaultHelpText(this, 'search user or tag', true);" /> ToggleDefaultHelpText(document.getElementById("myTextBox"), "search user or tag", false); |
The better way to do this is to programmatically attach this function to the onfocus and onblur events of your text input. If you’re using MooTools it’ll be clean and simple - the above code turns into something much neater:
1 2 3 4 | <input type="text" id="myTextBox" /> $('myTextBox').addEvent('focus', function() { ToggleDefaultHelpText($('myTextBox'), 'search user or tag', true); }); $('myTextBox').addEvent('blur', function() { ToggleDefaultHelpText($('myTextBox'), 'search user or tag', false); }); $('myTextBox').fireEvent('blur'); // execute the onblur function to initiate this text box |
Hope this helps you to help your users.
It has been an obssession of mine to reboot routers on a routine basis. I’m not sure why I do it, but it makes me believe that the router is kept “fresh” and will continue to perform optimally. Maybe I am just used to running Windows (where you will need to reboot the machine every once in a while).
Anyways, I wrote hacked together a simple AppleScript (note: this is my first AppleScript ever written) which simulates menu clicks in the AirPort Utility to restart my Time Capsule. The script doesn’t choose which Apple wireless device to restart, as I only have one - the Time Capsule. If you want to use the script and you have multiple wireless base stations (eg. an AirPort Express), you may have to modify the script to choose which one to manipulate.
Here is the simple AppleScript:
tell application "AirPort Utility" activate end tell tell application "System Events" delay 10 click menu item "Manual Setup" of menu "Base Station" of menu bar 1 of process "AirPort Utility" delay 5 click menu item 6 of menu "Base Station" of menu bar 1 of process "AirPort Utility" delay 5 click menu item "Close" of menu "File" of menu bar 1 of process "AirPort Utility" end tell
With this script saved, I scheduled it to run automatically every week. Of course you can use cron and set this script as a scheduled job, but why do that when you can use iCal? Here’s a thousand words on how to set the script to run automatically:

You may never have a need to restart your Time Capsule automatically, but if you do, this should give you a starting point on how to go about doing that.
I could be the last person to find out about the ‘SYLK’ issue with loading CSVs in Excel, but the good thing about that is there are plenty of answers out there as to why it happens.
My current project has a “download database data to CSV” feature, and every database table starts with “ID” as the first column. Generating CSV files with headers would give something like this:
"ID", .... 1, .... 2, ....
A quick search on Google gave me this page, with a very blunt answer as to why it happens:
Because the Excel programmers are sloppy. A valid SYLK file begins
with ‘ID;’ or ‘ID’ alone on a line.Sometimes Excel incorrectly says ‘SYLK: file format is not valid.’.
When you try to open a text file that begins with, say, ‘ID’ and a tab,
it could not possibly be a valid SYLK file, but Excel claims it thought
it was, to no avail.Simply rename ‘ID’ to ‘Ident’ or ‘Id’ or something similar.
Changing “ID” to “Id” fixed the problem, and my CSV files opened in Excel correctly. Now hopefully no one else gets tricked by this Easter Egg Microsoft left for us.
Importance of permalinking in SEO
My coworker Nick Simpson is truely amazing. He is one of the most knowledgable sys admins I’ve known and I’ve been with many different companies (ie. I’ve been around the block). His blog is neatly designed and he stumbles on many neat things. Just recently I’ve been introduced to a new Facebook app to keep track of birthdays, and I got that information from his recent post titled “Facebook iCal birthdays“.
But if you do a search for “Facebook iCal Birthdays” on Google, you won’t find Nick’s post. Even a search for “Nick Simpson” doesn’t return much from his blog.
One thing I’ve noticed is that the permalinks for his blog posts are in a very machine unfriendly format.
![]()
This doesn’t translate into any searchable keywords, and makes it hard for anyone to find this via a keyword search.
I’m a big fan of searchables and many readers of my blog find my content via search engines (actually, only through Google…is there any other search engine?).
I hope Nick reads this and changes his permalink structure to include the post’s title, or the post’s keywords, as part of the permalink for the story. You may already know this, but in WordPress, going into Settings->Permalinks will allow you to choose a suitable link for your posts.
What good is creating content if no one can find it?
Share Twitter links in WordPress
I started using Twitter Tools a few weeks ago to aggregate my tweets in a daily blog post. Last weekend, I had an idea where I could also aggregate tweets in my friends timeline. I thought that it would be cool to show the links that my friends are sharing with the Twitterverse.
I started with Twitter Tools as a base, and after reading and understanding the code, it was relatively straightforward to add a seperate call to the friends timeline. Once I had the desired tweets, scraping, storing and posting the ones containing links were easy and routine.
Now that it’s all said and done, I’m enjoying sharing novel links from Twitter on my blog. However, the daily digest posts are now very lengthy due to the amount of links my Twitter friends post. It’s kind of good and bad at the same time.
Does anyone have any suggestions for the “Links” section of the Twitter digest? How to make it more relevant or compact, or perhaps display it in a different way?
Twitter Tools by Alex King [alexking.org]
Where are you in the Google index?
A mid-term mission of mine is to appear on the first page of the Google (US search) index for the search phrase “David Chan”. I’ve been working on it on and off, studying SEO here and there on my free time.
A tool I use to check my search engine ranking position (SERP) is the Top 100 Rankings Position Checker. Not noted for its looks, it’s pretty useful in finding if an url is within the top 100 Google results for a particular keyword or phrase. Best of all is the ability to bookmark your query so you can validate your ego in one click!
Hmm my current rating is “very nice”, but as this tool points out, it’s not good enough. More work on this in the future.
Easy to click links using padding
If you have ever been frustrated with impossible to click links on site navigation menus, email this 37signals blog post to the sitemaster.
Basically the technique of padding links has been around for a long time, but has been largely ignored when implementing the HTML. Many designs encorporate large areas around links, yet there’s a grey-area as to whether these areas should be clickable as well. I think that anything which makes it easy for the user should be done, and done well.
Padding link targets for better mousing [37signals]
Empty WordPress RSS feeds
Last week, my colleagues and I have decided to read and review each other’s blogs, in an attempt to reinforce blogging amongst the team. I wanted to prepare my blog’s RSS feed so that it’d be easy for a tool to aggregate all our feeds together into one syndication. I went to my blog’s RSS 2.0 feed in my browser and was unpleasantly surprised.

Where are all my posts? I also checked my atom feed and it was even worse, it showed up completely blank in my browser! I tried to add the feed into my Google Reader and it came up fine, which was a bit confusing.
A quick Google search produced others in the same situation, and I didn’t see any real solutions or fixes for it. I think Scoble’s rant pretty much summed up the problem, that the WordPress RSS feed doesn’t validate, and shows up differently in browsers and such. That explains why it came up empty in FireFox but displays correctly once added to a feed reader.
Luckily I don’t have nearly enough readers to complain about my feed being quirky. I think WordPress would (hopefully) have this issue fixed before my blog grows to that proportion.
