Gl.ib.ly

(glibly); Just another techie blog.

Setting Google search language in Firefox 3.5 on the Mac

Posted by Tariq • Wednesday, July 29. 2009 • Category: Tidbits
While traveling around the place I have been highly annoyed at the Firefox search box's default behavior for Google search. While in the Middle East it shows me RTL pages in Arabic. Well you can easily fix this on the Mac!

Just open the file /Applications/Firefox.app/Contents/MacOS/searchplugins/google.xml in an editor. I normally use vim, so: vim /Applications/Firefox.app/Contents/MacOS/searchplugins/google.xml or you could let your OS decide open /Applications/Firefox.app/Contents/MacOS/searchplugins/google.xml at the terminal.

You should see something like:

...
<Url type="text/html" method="GET" template="http://www.google.com/search">
  <Param name="q" value="{searchTerms}"/>
  <Param name="ie" value="utf-8"/>
  <Param name="oe" value="utf-8"/>
  <Param name="aq" value="t"/>
  <!-- Dynamic parameters -->
  <Param name="rls" value="{moz:distributionID}:{moz:locale}:{moz:official}"/>
  <MozParam name="client" condition="defaultEngine" trueValue="firefox-a" falseValue="firefox"/>
</Url>
...


We change this to:

...
<Url type="text/html" method="GET" template="http://www.google.com/search">
  <Param name="q" value="{searchTerms}"/>
  <Param name="ie" value="utf-8"/>
  <Param name="oe" value="utf-8"/>
  <Param name="aq" value="t"/>
  <!-- Stop Google from thinking we read anything but English -->
  <Param name="hl" value="en"/>
  <!-- Dynamic parameters -->
  <Param name="rls" value="{moz:distributionID}:{moz:locale}:{moz:official}"/>
  <MozParam name="client" condition="defaultEngine" trueValue="firefox-a" falseValue="firefox"/>
</Url>
...


You can change this to any language (just change hl's value) or even country specific languages, like en_GB. When you finish editing save the file and restart Firefox (⌘Q). When using the search box you should now only see results in English.
Defined tags for this entry: , , , , , , ,

Doing OCR on linux/Mac

Posted by Tariq • Monday, July 27. 2009 • Category: Programming, Tidbits
Yesterday somebody gave me a USB key with ~1000 JPEGs on it. Each JPEG was a scanned page, ugh, and the task was to find some useful information about topic X. Now each JPEG was about 1-2mb and I needed to do something useful with these images quickly. So what follows is quick walk through of how to do Optical Character Recognition (OCR, that means taking silly image files and ripping out any text identified in them) on Linux or in my case a Mac.

Continue reading "Doing OCR on linux/Mac"

Encoding audio and removing file extensions from files

Posted by Tariq • Friday, July 24. 2009 • Category: One liners, Tidbits
Earlier today I got a massive SCORM object that contained lots of mp3 files. They were all high quality files, so I wanted to cut them down in size for web use. For this purpose I am using ffmpeg which you can easily get for Windows, Linux or Mac. I tried the following on a Mac, but it should also work on Linux (paths permitting) and on Windows if you are using something like cygwin.

I highly recommend you get familiar with ffmpeg as it is amazingly useful. Just check out the man pages; swf to avi, avi to something that works on ipods, all a breeze!

Continue reading "Encoding audio and removing file extensions from files"

Defined tags for this entry: , , , , , , , ,

Forwarding multiple mails in Google Mail

Posted by Tariq • Thursday, July 16. 2009 • Category: Tidbits
One gripe I have had for years is the inability in Google mail to forward more than one message at a time. I am not sure why it hasn't been implemented after all these years; scared of extra traffic, spam? Anyhows, this rant brings me to some new functionality Tasks. Now I could rant on about this a bit because IMHO it sucks ass right now, but hey, a move in the right direction. If it works well in six months I'd be happy.

But I'd be mucho mucho happier with the ability to forward multiple mails.

P.s. Anyone else notice the ultra crap quality of attached images when you click 'view' instead of 'download' lately?

P.s.s. This all doesn't negate the fact that Google Mail, overall, is awesome.
Defined tags for this entry: , , , , ,

Authentication usability gripes

Posted by Tariq • Wednesday, July 1. 2009 • Category: Tidbits
For the longest time I have been unhappy with password masking in GUIs. I never really saw the point and a whole host of functionality has been developed to help users out when dealing with passwords; browsers remember and auto-populate password fields for users. I use many passwords, even have my own encrypted password lists, however, I only use a handful of sites everyday and I know those passwords pretty well. This doesn't stop me from making errors while typing complicated 10-16 character passwords -- three in a row is not unheard of and then you have to deal with unreadable CAPTHAs. Seeing the password reinforces the context in which the password is used and helps users learn them off more quickly.

A much better option is to use a screen privacy filter to stop a wide audience from snooping over your shoulder.

This is just one of those gripes that was rekindled when I read The Problem with Password Masking.
Defined tags for this entry: , , , , ,