Thursday, September 21, 2006

Mozilla/Firefox Hacks for Power Users (Hack 200C+0002)

Here is some preferences I have set, and you may like to set them, if you are a power user, bidi user, or your locale is not en-US, but have to use this locale.

Newbie HOWTO: use "about:config" to set this key/values.

Power User:
  • layout.word_select.stop_at_punctuation
  • layout.word_select.eat_space_to_next_word
Set them to TRUE if you want Ctrl+Left/Right-Arrows stop at the start/end of alpha-numeric words (like what you get on Gtk+/Gnome). Default values make it to jump to the next/previous Space/Tab character! The second one also affects word boundary on selecting with mouse double-click.

  • browser.triple_click_selects_paragraph
(Mozilla >= 1.9, Firefox >= 3.0a1)
This option allows you to select whether triple click should select the whole paragraph, or just the line you are clicking. If it's FALSE, you can select the whole paragraph with quadruple-click (Wait, it doesn't work on Gtk+/Gnome, as Gtk+ doesn't support quadruple-click. If you like it, here are the Mozilla bug: #348751.)

  • network.http.max-persistent-connctions-per-proxy
  • network.http.max-persistent-connctions-per-server
If you use Tor, or any other proxy in your LAN, just set the first one to a big number (I use 50). Also I set the second one to 8, as Flickr and many other photo-sharing sites use just one domain for almost all images on the their pages, so I cannot get even two pages simultaneously. ( is smart enough)

  • network.protocol-handler.external.ed2k
Here are how you can define a protocol and set the external application. In this example, I set ED2K protocol. Create the first key as Boolean, and set the value to TRUE. Then create the second key as String, and set the path to your ed2k link-handler ("/usr/bin/ed2k" for me) as its value. That's it.
Homework: Create a protocol-handler and write a script to handle Yahoo! Messenger links, and make GAIM do the requested action (add buddy, send message, etc). Of course you should mail them to me to get your point. :D)

  • mousewheel.horizscroll.*.action
Try possible values for this key (0..4 IIRC) to get more functions under your fingers (horizontal scroll of your professional mouse, or the touch-pad of your laptop).

  • printer.printer_PostScript/*.print_paper_name
If you live in a country (or organization) which the default paper size is A4, not Letter, just set the value of this key to "A4".

  • browser.fixup.alternate.suffix
And if your want to set the default ".com" value to something else (i.e. "" or ".ir"), just set it in this key.

  • bidi.browser.ui
And this is the best part for Arabic, Iranian (Persian), and Israeli (Hebrew) users. Setting this key to TRUE will do some magic for you. You can switch the text direction and alignment of input fields with just one keystroke: Ctrk+Shift+X! Also you can switch the page direction from the View menu. Help yourself!

  • mousewheel.horizscroll.*.numlines
If you use Mozilla/Firefox in a right-to-left locale, just set the value of these keys to "1" instead of default "-1". Here are the Mozilla bug: #350594.

Ok, that's all. Let me know if you have problem with this hacks, or other L10n (localization), Bidi (bi-directional), or RTL (right-to-left) problems with Mozilla/Firefox.

Friday, September 01, 2006

Metro Lines I Have Used

In order of time:

Here are Behdad's and Luis's. Should it be more than ten to blog it? I'm not sure... but, how you will update it?

Wednesday, August 30, 2006

What Microsoft did to the Persian Language

Recently I installed Microsoft's Persian UI for Windows XP. Seems like Microsoft can't do anything right for Persian. They use SPACE instead of ZWNJ everywhere in the UI. WTF?! After spending about 1.5 million USD on Persian (they even call it Farsi) support on Windows, the real Persian Windows is still a dream. They are practically removing ZWNJ from Persian, just because they don't know how to use it (or rather, their American-grown confused Iranians don't.)

Microsoft is the one who brought U+064A ARABIC LETTER YEH (Yeh with two dots bellow in final and isolate forms) to Persian, instead of U+06CC ARABIC LETTER FARSI YEH (Yeh without any dots in final and isolate forms), with their buggy fonts. Even Windows Persian keyboard layout have never been compatible with the Iranian standard layout. Now it's so common to see Arabic Yeh and Keh instead of Persian ones everywhere, everytime. More info.

This story reminds me of an old joke:
A British guy was arguing with a Hindi guy.
The British guy says:
We f**ked your country for one hundred years!
The Hindi guy responds:
We f**ked your language forever!

Sunday, August 20, 2006

Thursday, June 01, 2006

Flickr Hack 200C+0001: EasyDownloadr

Behdad and I prefer to have the "Original" size of a photo to view, or use (if it's under a CC lisence). So we wrote a Bookmarklet to make it easy to save the original size of an image on Flickr.

Here is the Flickr EasyDownloadr bookmarklet.

HOWTO: Right click on previous link. Bookmark it (preferably in Bookmarks Toolbar Folder and rename it if needed). Open the Flickr page of the image and use this bookmark to save the original size of the image.

UPDATE: And here are the Flickr EasyOpenr which just opens the original size.

Wednesday, May 31, 2006

Jalali Calendar for Google Calendar

A couple weeks ago, I wrote the Jalali GCal user script (a JavaScript that Firefox runs on the web page if you have GreaseMonkey extension installed) to add Jalali Calendar (A.K.A. Iranian Calendar) to Google Calendar application.

As you can see in the screenshot, it adds Jalali year, month, and month days beside the Gregorian ones. (which makes it really useful for me! ;) This version (v1.1) supports all views: Day, Week, Month, Next 4 Days, and Agenda!

To use it, you should install GreaseMonkey (for Firefox 1.5), then open Jalali GCal user script and install it. Now refresh Google Calendar page.

Of course it's under LGPL license. I hope you like it.

Update: Jalali GCal moved to Google Code

Your Google public Calendar is NOT public!

I use Google Calendar in day life and also maintain GUADEC 2006 iCal file and keep it synced with the schedule of The GNOME Conference. Stop! don't try to add that iCal link to your Google Calendar account. It doesn't work and you will get an error message.

Here are what happens:

  1. Google's robots crawl the web and index all calendar files (i.e. iCal), and of course they check the robots.txt file to make sure they are allowed to do this.

  2. Unfortunately, Google Calendar AJAX application checks robots.txt. May be it uses the indexed file at Google's server and so it's a side effect of the previous fact.

  3. Unfortunately again Google's robots.txt file doesn't allow crawlers to index your public calendars.

Our iCal link is just an HTTP forward to the address of the file on Google's server. And yes, because of facts 2 and 3, you cannot add our iCal URL to your Google Calendar account! Not Google only, you cannot use it on any other web application that respect to robots.txt files. And of course you won't have your public calendar indexed in any search engine; but Google! It reminds me on how Microsoft tried to make its website somehow Netscape couldn't show it properly.

By the way, if you want to add GUADEC 2006 calendar to your Google Calendar account, just search for "GUADEC 2006" there, and add it directly. And send me a note if you need write access to it.

Update: Problems:

  1. An organizer application (feed reader, calendar, etc) SHOULD NOT use robots.txt files, as it's NOT a crawler, it's just a user agent which do exactly what a user tells it (like a browser).

  2. Google MUST allow other web crawlers to index public calendars, and NOT make a monopoly .

Friday, March 03, 2006

Intellectual Property in Iran

Center for Technology Studies (SUT) held a workshop on intellectual property at Graduate School of Management and Economics (SUT). Kamran Bagheri, from Iran's Research Institute Of Petroleum Industry, lectured on the Intellectual Property Acts in US, EU and Iran. Here are some interesting news!

The Intellectual Property Act of Iran is under revision! It has been approved in the first vote in Parliament (Majlis), and in about seven months, it will be a law. Some effects of this act (as Mr. Bagheri told) will be increase in registration prices (i.e. you can get a patent for $30~40 by now) and international interest on copyright and patent registeration in Iran.

Update: Current amount of registered patents per year is about five thousands, that may increase up to fifty thousands with the new act.

I'm trying to get more information and will post here as soon as possible.

Journalists' Rights in Iran

Based on news reports, Kambiz Norouzi will be in court branch no. 1083 of General Court of Tehran, headed by Judge Husseinian and he will defend himself. He is accused of propaganda against the establishment, irreverent comments and his accuser is general prosecutor.

Hope they let me to get to the session.

Kambiz Norouzi is a Lawyer and Lecturer on Press Rights in University and Media Education Center in Iran. More about Kambiz Norouzi: English, Persian, Persian (misspell)

Thursday, January 26, 2006

And the LORD said: Vim

And the LORD said, behold, editor is one, and it has one binding language; and this they begin to do: and now nothing will be restrained from them, which they have imagined to do.

Bram sent an email titled "Vim mapping" to announce mailing list, so I joined the group at Frappr. The map is found here: