Frank’s Weblog

Old enough to know better, young enough to not care

Google please do not redirect me just because I am traveling

I am traveling a lot for my current job taking me also outside of The Netherlands into Belgium and Germany from time to time. Lately I spent a lot of time around the Brussels in Belgium, which is the French speaking part of the country. As a result all the searches I perform using the Google search bar plugin within Firefox get redirected to a French version of the Google pages and the search result favor web pages written in French.

Since I can hardly speak or read French I find myself constantly typing in a URL for a (in my case) Dutch localized version of Google to do my searches. This totally defeats the purpose of Firefox’s search bar.

Look for a file named google.xml. On Windows systems this file is located at C:\Program Files\Mozilla Firefox\searchplugins. On Mac OS systems the file is inside the Firefox.app. You can get to the file by right (or control) clicking on Firefox.app and selecting ‘Show Package Contents’ from the menu. Within the new Finder window navigate to /Contents/MacOS/searchpulgins.

By default (Firefox 3.0.6) the file contains the following information (except for the Image tag, data for the image itself has been removed)

<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>Google</ShortName>
<Description>Google Search</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:image/x-icon;base64,...</Image>
<Url type="application/x-suggestions+json" method="GET" 
     template="http://suggestqueries.google.com/complete/search?output=firefox&client=firefox&hl={moz:locale}&q={searchTerms}"/>
<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>
<SearchForm>http://www.google.com/firefox</SearchForm>
</SearchPlugin>

Edit the content of the file like below (bold text indicates the changes made to the file)

<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>Google</ShortName>
<Description>Google Search</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:image/x-icon;base64,...</Image>
<Url type="application/x-suggestions+json" method="GET" 
     template="http://suggestqueries.google.com/complete/search?output=firefox&client=firefox&hl={moz:locale}&q={searchTerms}"/>
<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"/>
  <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>
<SearchForm>http://www.google.com/firefox</SearchForm>
</SearchPlugin>

This little change ensures that you are still being addressed in English although you are still redirected to a localized Google page. If you totally want to prevent the redirect to happen you could, instead of using “http://www.google.com/search”, use something like “http://www.google.nl/search” or any other of Googles localized search pages.

February 26, 2009 Posted by fmeus | Firefox, Network, Software, Technology | | No Comments Yet

Using Foxmarks to synch to iPhone/iPod Touch

For some time now I have been using Foxmarks to keep my bookmarks synchronized between several machines I am using. At first Foxmarks, as the name implies, was for Firefox only. About 3 months ago Foxmarks put out betas for both Internet Explorer (Windows only) and Safari (Mac only). The beta period is now over (February 2, 2009) and you can now download Foxmarks for the mentioned browsers from the Foxmarks site.


By just using the Foxmarks software you will be using the following synchronization setup
Synchronization setup



Since Foxmarks allows for synchronization with Safari, it is now also possible to synchronize your bookmarks with your iPhone or iPod Touch. For this you will need a MobileMe subscription. The synchronization setup will then look like this
Synchronization setup with MobileMe



On the Mac side you need to setup for Foxmarks and make sure the Foxmarks synching is running
Foxmarks setup

and for MobileMe you have to enable the Bookmarks synchronization
MobileMe setup

On the iPhone/iPod Touch side you have to setup MobileMe synchronization (visit this page for detailed information on setting up MobileMe)


I have only had two issues with Foxmarks so far;

  1. Dividers in Firefox sometimes get replaced with “———-”. Normally Foxmarks does a good job keeping dividers being dividers in Firefox
  2. At some point in time I ended up with two ‘Unsorted Bookmarks’-folders

Both issues are easily solved and never resulted in loosing any of my bookmarks and I am almost certain it was caused due to me playing around with some settings (MobileMe and Foxmarks for Safari) on two machines.

I am only using the bookmark synchronization of Foxmarks, since I am using 1Password to keep my passwords save and secure.

February 25, 2009 Posted by fmeus | Apple, Network, Software, Technology, iPhone | | No Comments Yet

Sharing a hotel WiFi connection over WiFi

For my daytime job I am spending a lot of time in hotels, which btw starts to suck big time. To be able to keep in touch with the rest of the family and do a bit of gaming I usually pay for 50 hours worth of WiFi access which last me through the whole month, well at least most of the time it does. Since I am also an avid iPhone user I turn on the roaming feature from time to time, which to no surprise results in a steep bill from T-Mobile.

So I started to think about this. So I am paying to have 50 hours of WiFi access and I pay T-Mobile for the roaming charges. I started to poke around in the System Preferences panel of my MacBook Pro. Like I suspected by default there is a possibility to share connections from one network card to another. Great.

Now I only needed to find me a nice little wifi router to become part of my standard traveling kit, which is starting to show more and more Apple logos. Quickly I laid my eyes on the AirPort Express. This little gadget was just what I was looking for, great form factor and the right price.

This sunday I was visiting the Media Markt in Rotterdam and I saw some of these beauties lying around. There were even some demo models at a discounted price (€80), so I just had to pick one up. And since my last to bills from T-Mobile both had around €80 of roaming charges, this was a no brainer. Since I had to go abroad the same day I could test the device almost immediately. Which is good since waiting to start playing with any gadget is not one of my strong points.

It turns out to extremely simple to create a private (or public) WiFi access point using the AirPort Express. It only took me two steps (excluding the normal setup of the AirPort Express, which to be honest I don’t for sure now is there is such a process, since mine had already been used to demo the unit). Anyways, here is what I had to do

1) Enable network sharing for your active network card. In my case I had to enable sharing from my built-in AirPort to the built-in ethernet card
AP-step1.png

    Enable ‘Internet Sharing’ and select the correct ‘From’ and ‘To’ network cards

2) Open up the AirPort Utility application and perform a manual setup for the AirPort Express to create a wireless network
AP-step2-1.png

    Press the ‘Manual Setup’ button

AP-step2-2.png

    Within the section ‘Wireless’ choose ‘Create a wireless network’, set a network name and provide security information

After these two simple steps I could whip out my iPhone and have it join the newly created wireless network.
Select network

Apple, thanks for making my life so easy!!

Tip: When you buy a demo model for any wireless device be sure to ask whether or not the store employees have specified a password for the device. In my case they did, luckily the password as written down in the instruction booklet of the AirPort Express.

February 16, 2009 Posted by fmeus | Apple, Hardware, Network, Technology, iPhone | | No Comments Yet

Optimizing memory usage in LUA

Couple of days ago I received a message on curse.com about the memory usage of UberInventory. The general statement was that UberInventory uses a lot of memory. We were aware of this issue, but we had never given it much attention. But after this message we could ignore it no longer.

We have been reading several articles on the internet on how to optimize memory usage, performance and garbage collection using LUA. All those documents basically state that using locals as much as possible improves performance when accessing data structures and when storing a lot of data most of the times it is better to create larger tables instead a lot of smaller tables. This some times leads to a little more unreadable data structures but it keeps garbage generation to a minimum and less memory is needed to store the data.

Since UberInventory contains a lot of static data (pricing and recipe data) our first focus was to see if and how we could optmize those data structures.

The following results have been generated using LUA 5.0.1 and we have used the gcinfo() function to produce the numbers.

Orignal version of UberInventory_prices.lua

Dynimac
Memory
Garbage
threshold
Before 1531 3062
After 4189 6124
Delta 2658 3062
UBI_Prices = {
 [25] = {nil,7},
 [35] = {nil,9},
 [36] = {nil,7},
};

Modified version of UberInventory_prices.lua

Dynimac
Memory
Garbage
threshold
Before 1060 2121
After 2500 2121
Delta 1440 0
UBI_Prices_Buy = {
 [38] = 1,
 [39] = 5,
 [40] = 5,
};
UBI_Prices_Sell = {
 [25] = 7,
 [35] = 9,
 [36] = 7,
};

As you can see with the modified version there is big drop in the total memory that is needed to store the data and the structure does not create any additional garbage.

Changes made to UberInventory_prices.lua

  • Split data into two tables, one for buy prices and one for sell prices

Original version of UberInventory_recipes.lua

Dynimac
Memory
Garbage
threshold
Before 961 1921
After 3160 3842
Delta 2199 1921
UBI_Creatures = {
 [66] = { name='Tharynn Bouden', area='Elwynn Forest' },
 [340] = { name='Kendor Kabonka', area='Stormwind City' },
 [450] = { name='Defias Renegade Mage', area='Westfall' },
};
UBI_Quests = {
 [22] = { name='Goretusk Liver Pie', area='Westfall' },
 [38] = { name='Westfall Stew', area='Westfall' },
 [90] = { name='Seasoned Wolf Kabobs', area='Duskwood' },
};
UBI_RecipeDrops = {
 [4213] = { {8716,1}, {12396,1} },
 [4408] = { {7800,1} },
};

Modified version of UberInventory_recipes.lua

Dynimac
Memory
Garbage
threshold
Before 636 1272
After 1230 1272
Delta 594 0
UBI_Creatures = {
 [66] = 'Tharynn Bouden|Elwynn Forest',
 [340] = 'Kendor Kabonka|Stormwind City',
 [450] = 'Defias Renegade Mage|Westfall',
 [590] = 'Defias Looter|Westfall',
};
UBI_Quests = {
 [22] = 'Goretusk Liver Pie|Westfall',
 [38] = 'Westfall Stew|Westfall',
 [90] = 'Seasoned Wolf Kabobs|Duskwood',
};
UBI_RecipeDrops = {
 [4213] = { '8716:1', '12396:1' },
 [4408] = { '7800:1' },
};

Here you see the same results, huge drop and no garbage. These changes combined resulted into a decrease in memory of between 2 and 3 MB just for the static data.

Changes made to UberInventory_recipes.lua

  • For creatures and quests combine the name and area into one text field instead of using a table structure
  • For drop info combine mob id and drop rate into one text field instead of using a table structure

All the changes described in this post are implemented for UberInventory 1.6.

The next step will be digging into the data structures of the dynamic data stored within UberInventory.lua (WTF\Account\…\SavedVariables) and optimize those for memory usage and garbage.

January 19, 2009 Posted by fmeus | UberInventory, World of Warcraft, lua | | No Comments Yet

Replacing HDD in an iRiver iH120

Years ago I was an avid user of an iRiver iH120, but since I started using iPod’s (yes, I have multiple) it was becoming a dust bunny. When my girlfriend started to follow some weekend courses, I gave the iH120 to her so she could record the lectures so if she had missed something during the course or just wanted to review a particular lesson she could just play the lesson to review it.

It as always worked until the iH120 was accidentally drop from about 1 meter onto a hard floor. The HDD did not survive that drop. So I bought her a Creative ZEN 4GB. It is a very nice MP3 player and has the ability to be used as a recorder. However it turned out to be not such a great recorder after all. It records the sound very well, but it has the tendency to pick all the sound in the vacinity making the recordings very hard to understand.

Thosiba MK3006GAL So I decided to see if I could restore the good old iH120 to working order, assuming it was just the harddrive that was broken and not any other parts of the player. So I did a bit of searching to see what kind of harddrive was needed for this type of player. It truned out that a Thosiba MK3006GAL harddrive of 30GB could be used as a replacement drive. So after this small repair it would have 10GB more space than before the drop.

I ended up buying on from gebruiktelaptop.nl where I could get one for € 19.95, which was quite surprisingly cheaper than what people were asking for the drive on eBay (lowest € 24, highest € 52).

This week the drive finally has arrived and time to get out the tools, well just one tool. You only need one Torx screwdriver (TX5) to take apart the iH120 and replace the HDD.

The replacement process
First a total of eight screws need to be removed, four from the bottom and four from the top of the iH120, after which you can remove the plastic top and bottom covers.
Top Bottom

Next you carefully open the unit making sure that you do not damage or brake the power cable that connects the two halfs of the iH120 together.

Now the old drive can be replaced with the brand new HDD and the iH120 can be assembled again.
The old HDD HDD removed New HDD installed

The whole process takes about 5 to 10 minutes to complete, and no technical knowledge is required.

Booting the iH120
Now that all the ‘hard’ work was completed it was time to boot the iH120. At first all seem to be fine the iRiver logo appears and after a while the main screen appears. However when using the browse function some strange info appeared on the screen.

Booting the iH120 Houston we have a problem

So I shutdown the iH120, opened it again, made sure all the cables were properly connected. All appeared to be fine so I closed the unit again. Then I decided to hook the iH120 up to my Mac and access the internal HDD of the iH120 using a USB cable. The iH120 showed up without any problems and I could copy files back and forth between the iH120 and the Mac. Conclusion HDD is working fine. As last resort I started Disk Utility to do some further testing of the HDD and as soon as I had a look at the HDD info within Disk Utility the problem was clear. It turned out the HDD was formatted using NTFS instead of FAT32. So I reformatted it as FAT32, disconnected the iH120 from the Mac.

This time when I booted the iH120 all was in working order and I am again a happy man :)

January 19, 2009 Posted by fmeus | Hardware, Technology | | No Comments Yet

Keeping my digital life in-sync (3)

This is the third installment of my quest to keep my digital life in-sync. In the second part about my quest I blogged about the use of Dropbox. In this post I am going a little deeper into some of the advantages I have come across on the internet.

1Password
I am using the application 1Password by Agile Web Solutions to keep track of all my username/password combinations used for the many websites I make use of. Up until a few days ago I used the Mac OS X Keychain synchronization of Mobile Me to synchronize the data between my two Macs. On the Agile Web Solutions Wiki I came across a page describing how you can use your Dropbox folder to store and synch the Agile keychain between your machines.

I have been using it for a couple of days now and so far it works very well, and feels a lot faster when data needs to be synchronized.

Things
As soon as I heard of the existence of Things by Cultured code I installed on my Mac and am using it as my main application to track all the things I need to do or have done by a certain time. This worked very well but it became cumbersome when I bought a second Mac (a Mac Book Pro) and started traveling around. There was a way of manually copying certain files to a USB stick and constantly copy these files between the two Macs. This goes well for a certain amount of time, but eventually I forgot to do the copy trick and was stuck with two difference lists of things.

Method #1: The article Sync Your Things Database via Dropbox desrcibes how you can move the Things library to a different location and then create a symbolic link on the original location for the datafiles that links back to the new location. Read this article carefully, if you don’t feel comfortable using the Terminal use the next method.

Method #2: I was very pleased when I came across the following wiki page describing how Dropbox can be used store it at a location that can be synchronized between several machines. This method is easier then method #1

The only things you really need to be aware of is that you only have one copy of Things running on any machine and make sure synchronizing has been performed between the machines before using Things on the other machine.

Method #1 as described for synching the Things database can be used for other Mac applications as well (for those applications that not let you choose where their information is being stored, like with 1Password), so I am making a list of applications for which I want to keep the data synched between machines.

I am liking Dropbox more and more everyday.

January 12, 2009 Posted by fmeus | Apple, Mac, Software, Technology | | No Comments Yet

UberInventory 1.6

We are currently working on UberInventory 1.6. At the time of this writing we have not yet set any release date.

Following is a list of tasks we are working on;

  • Fix issue that occurs on fresh installs (or joining a new guild) of UberInventory when visiting the guild bank

  • Redesigning the settings module
  • Adding more options to customize the behavior of UberInventory
  • Improving overall performance (specifically determine usability of items)
  • Removing obsolete code

January 6, 2009 Posted by fmeus | AddOns, Software, UberInventory, World of Warcraft, lua | | No Comments Yet

Upcoming version of UberInventory

Over the time we have received requests from users that they would really like to be able to search across multiple characters, guildbanks or all the data that has been collected.

Within version 1.3/1.4 of UberInventory we started to make some of the necessary changes to the way we build up the user interface filters and how they are linked back to the data structures used for storing information on items. Over the last couple of days we have been working on making the modifications necessary to also make it happen from a coding point of view.

The new location filter will look as follows
UBI Location filter

All items – Combination of all characters and all guildbanks, including the current character

Maymayhem – My current logged in character, will display items from all locations
  Bag – Show items stored in the bags of the current logged in character
  Bank – Show banked items of the current logged in character
  Keyring – Show items stored in the keyring of the current logged in character
  Mailbox – Show items stored in the mailbox of the current logged in character
  Equipped – Show equipped items of the current logged in character

All Guildbanks – All guildbanks combined
  The Mystics – Items stored in The Mystics guild bank
  Wolf Pack – Items stored in the Wolf Pack guild bank

All Characters – All characters combined, including the current logged in character
  Drexore – Items from the Drexore character
  Galure – Items from the Galure character
  etc.

This preview demonstrates the new functionality within the UberInventory interface
UBI Main interface

At the moment there are still some issues that need to be tackled;
- Show correct cash totals when selecting combi items (All items, All Guildbanks and All Characters)
- Display proper info within tooltips
- Do some in-game testing
- Warn if there are 50 messages stored in the mailbox. WoW only show 50 mails even if you have more mails waiting.

We are making good progress and are hoping to be able to provide you all with a new version of UberInventory before Christmas.

The new version will also contain an updated version of the static data for prices and recipe data, and now contains information on book related items (like Gift of the Wild).

December 17, 2008 Posted by fmeus | AddOns, Software, UberInventory, World of Warcraft, lua | | No Comments Yet

Apple invasion

Few days ago a was just sitting behind my desk and looking at all the electronic equipement/gadgets I had sitting or lying around. After a bit of counting I was amazed to find out that I had over 9 products from one manufacturer. Even more amazing for me was the fact that it took only a little over two years for this invasion to unfold.

My life has been invaded by Apple Inc and unlike other invasions this does not give me a bad feeling on the contrary I feel quite good about it. Sure it cost me an arm and a leg to aquire all of these products, but every time I use these products it feels just right.

So what have I been collecting from Apple over the last

January 2, 2006: iPod Video 5th Gen 60GB
July 31, 2006: iMac 20″ (Model Early 2006)
November 20, 2006: Apple Mighty Mouse Wireless
March 3, 2007: Apple Wireless Keyboard
March-June 2007: iPod Shuffle 2nd Gen 1GB
February 7, 2008: iPod Touch 32Gb
July 15, 2008: iPhone 3G 16GB Black
June 28, 2008: MacBook Pro 17″ (Model Early 2008)
July 2008: Apple Remote

When I would include Apple’s software packages as well, the following items could be added

August x, 2007: iWork ‘08 iWork '08
August x, 2007: iLife ‘08 iLife '08
September 6, 2008: Mac OS X Leopard Mac OS X Leopard

It seems that I have been transformed into an Apple-addict… Ah well, it could have been worse ;)

November 6, 2008 Posted by fmeus | Apple, Hardware, Software, Technology | | No Comments Yet

Keeping my digital life in-sync (2)

Some months ago I wrote the post Keeping my digital life in-sync. At this moment I still haven’t found a good working solution to keep my bookmarks in-synch. This mainly concerns the bookmarks within (Mobile)Safari on my iPhone. FoxMarks does a pretty good job for anything bookmark related in Firefox, which is my preferred browser on all platforms (Windows, Mac and Linux).

When it comes to being able to access the same documents from different machines I started to use Apple’s MobileMe by using its iDisk functionality. But for whatever reason it didn’t really work well for me.

Since the time I started using Macs I have been listening to the The Mac Geek Gab Podcast by Dave Hamilton & John F. Braun. For some time now I heard them mention Dropbox. So after hearing about their good experience with Dropbox I decided to give it a try.

At the time of writing I have installed Dropbox on four machines (two Macs and two Windows machine) and I like it! It has a nice feel to it, just by looking at the Dropbox folder I can see what the status of my files are (All done or still folders/files to be synched).

One thing that I have found that does not work (not sure that it should) is when you use Dropbox for folders that also contain hidden files. I have some folders that also have files that start with a dot, making the files invisible on Unix based platforms (Mac, Linux, etc.). When these files got synched to the Windows machine the files and folders where created but where visible. When synching between two Windows machines these attributes are also lost. So it is my guess that file and folder attributes are just always lost.

For not a real big issue but I can imagine that for others it is a big deal, so let’s hope Dropbox will find a way of fixing this issue cross platform.

You can get Dropbox for free including free 2.0GB of storage, which if needed can be upgrade to 50GB for $9.99 per month or $99 yearly.

One important note when using the free version of Dropbox. If your account has been inactive for a period of 90 days Dropbox may delete any or all of your files. This is done without prior notice.
Just so you know…

October 20, 2008 Posted by fmeus | Apple, Firefox, Mac, Network, Technology, Windows | | No Comments Yet