Wednesday, December 19, 2007

My first AppJet and some thoughts on it

I write my first AppJet application, which is migrate from a Google Gadget. The migration is smooth and the experience is very good. The app is called "Goal Chart" you can try it from the following URL.

AppJet is great for writing small-scale web application. If it provides a XML+HTML parser and support OpenID it will be our dream platform for writing mashup.

Saturday, November 24, 2007

Howto install Firefox 3 co-exists with Firefox 2

Mozilla just release Firefox 3 Beta 1. Review said it is much faster and consume less memory. It definitely worth a try but for the obvious reason you have to keep your Firefox 2. Here is the steps show you how to install Firefox 3 and make it co-exists with Firefox 2.

1. Right click the shortcut of the Firefox 2, click "Properties". Add "-profilemanager" at the end of the shortcut path. Click OK. Then run this shortcut to launch Firefox Profile Manager.

2. Create a new profile, name it "firefox3". And uncheck the "Don't ask at startup"

3. Go to Properties of the Firefox 2 shortcut again, remove the "-profilemanager" and add "-p default" at the end of the path. This forces Firefox 2 to open the original profile.

4. Start install Firefox 3. Choose "Custom" when you are asked.

5. The default Destination Folder is "Mozilla Firefox 3 Beta 1", which is stupid when you later update to Beta 2, Beta 3 or even 3.0.1. So change it to Mozilla Firefox 3

6. Same in Start Menu Folder name.

7. When installation completed, uncheck the "Launch Firefox now". You still have something to do before you can run it.

8. Go to the Properties of the Firefox 3 shortcut. Append "-no-remote -p firefox3" to the Target. The "-no-remote" will let Firefox run a separate instance. The "-p firefox3" will force yoru Firefox 3 to run the newly clean profile.

9. Run the Firefox 3, and you will be prompted that your Firefox is not the default browser. DON'T click Yes. Firefox 3 is not stable and you won't like to use it as your default browser. Simple uncheck the "Always perform this check when starting Firefox" and click No.

10. Now you can run Firefox 2 and Firefox 3 at the same time. Enjoy it.

Saturday, November 10, 2007

The most overrated Firefox addons

I like Firefox, and addons is the biggest reason. But some of highly rated addons doesn't seems to be that useful and you shouldn't install them. Here is my brief review of the top 10 Firefox addons (as of 9-Nov-2007).

3. NoScript by Giorgio Maone

"Winner of the "2006 PC World World Class Award", this tool makes Firefox the safest browser around."

If you want the safest browser, get lynx. Without javascript you have problem visiting all of your favorite website, including Gmail, Facebook and Meebo. Once installed it, you find yourself just keep allowing javascript for each site you visit, which is very annoying

Firefox is safe, period.

6. PDF Download
by Denis Remondini

"Allows to choose if you want to view a PDF file inside the browser (as PDF or HTML), if you want to view it outside Firefox with your default or custom PDF reader, or if you want to download it!"

If you want to view PDF outside Firefox, use Foxit Reader.

9. Forecastfox
by richwklein, Jon Stritar

"Get international weather forecasts from, and display it in any toolbar or statusbar with this highly customizable and unobtrusive.."

Believe me, you don't need to know the weather every second. When you want to know, just click the bookmark.

10. FoxyTunes by Alex Sirota

"Do you listen to Music while surfing the Web? FoxyTunes lets you control almost any media player and find lyrics, covers, videos, bios and much more with a click right from your browser."

Just because I like to control my player directly instead of clicking the tiny buttons in my browser.

Saturday, September 29, 2007

Greasemonkey script to show actual unread count in Google Reader

I subscribed over 200 feeds in Google Reader. And for some reason I did not login for a week, guess what? I have thousands of unread items. At the old days, Google Reader displayed "100+" unread items which is absolutely not enough for most users. After upgrading, it improved. Now it displays "1000+" as unread items count. It is enough for most cases, but not this one.

I start clearing the articles. After a few hours I loss the motivation. The unread count is always "1000+" and I don't know when can I finish. I don't know the target. I need to know the exact unread items count. So I wrote a Greasemonkey script to calculate the actual unread count.

Install the script in

After installed the script, you can see a button (the Google Reader icon) besides the unread count, click on it will do the calculation and update the unread count with the actual number. Note that it will ignore any duplicated entries.

This is not the best solution. It doesn't auto-update, you have to click it every time. But at least you can get the count and you shouldn't use it every day.

7-Nov-2008 update:
Version 3 released to fix the layout changed from Google. Details here.

13-Nov-2008 update:
Version 4 released to support Chrome. Details here.

Wednesday, February 7, 2007

Preserve directory when change drive in cygwin

In cygwin, you can use "cd c:" or "cd d:" to change to different drives. However, it always change to the root directory of the drive. In Windows command prompt you have a nice feature that the c: or d: will change to the directory that you previous stayed in that drive. For example:
C:\Program Files\Mozilla Firefox\extensions>d:
C:\Program Files\Mozilla Firefox\extensions>

However, in bash, you just can't do this

extensions>cd d:
d>cd c:

Here I add some aliases to implement this feature in bash. Add the following lines in $HOME/.bashrc:

export PWD_c=c:/
export PWD_d=d:/
export PWD_e=e:/
alias c:='export PWD_`expr substr "$PWD" 11 1`="$PWD";cd "$PWD_c"'
alias d:='export PWD_`expr substr "$PWD" 11 1`="$PWD";cd "$PWD_d"'
alias e:='export PWD_`expr substr "$PWD" 11 1`="$PWD";cd "$PWD_e"'

You may need to add more PWD_x environment variables and alias in case you have more drive. Make sure you have the quotes (") because of the spaces in long file name.