Trying out Firefox 4 Beta 4.

For a good long time have been a Firefox beta tester. So far, was pretty much settled with Firefox 3.6.x, but now have started to test Firefox 4. So far, the first impression I had was .. “its lighter”. But wait, more on that later.

There is an instant feedback add-on installed with FF4, as simple as “Firefox makes me happy/sad” links.

The rendering engine is better sure. But the big down part of trying new Firefox beat/releases is the lack of support for existing extensions. For me personally, I tend to use extensions with Firefox than say Firefox with extensions! In earlier times, I would just unpack, the xpi files and change the supported Firefox versions. But not right now.

Also, continuing on the observation that this new installation is lighter/faster, I think it goes only as far as installing or enabling all the extensions I use. Yes, no doubt that Firefox is a big memory hogger at times, atleast on the windows platform. My home Firefox(3.6.10Pre on Ubuntu) is much faster I believe.

Will post more updates later.

Ubuntu clive http 404 error solution.

Update:
For 11.04’s clive version 2.2.13, the youtube video URLs are throwing the following error.

error: no match: `(?-xism:fmt_url_map=(.*?)&)'

and the solution for this is to pick the package from Ubuntu 11.10 oneiric which is of version 2.2.25-2 as of this writing.

Clive is very useful commandline utility to extract video from video websites like youtube.com and vimeo.com. The recent update to youtube url is causing clive to fail for any youtube url, giving unknown http/404 errors. Although the upstream is fixed the ubuntu package is still not updated with the same version i.e as of this writing clive_2.2.12-1.

In the meantime you can download the debian package for sid from here.

Remove pen drive folder.exe virus using linux.

Instructions to detect and delete EXE folder viruses. This virus has an extension of .exe corresponding to the folder name in the drive.

For example if a folder has subfolder called as exam there will be an equivalent exam.exe existing too.

In the windows explorer, these exe files will appear as an folder and user is tricked onto click them hence helping it spread to the host machine.

Well, there comes the solution.(OK its for the privileged, but try finding a linux machine in the vicinity, well even Osx for that matter!)

Open a terminal (Usually gnome-terminal or konsole (kde).

* Proceed to the mount location of the usb drive.
$ cd /media/disk

* Look for exe files which have the file size 496
$ find -i iname “*.exe” | xargs -i du {} | grep 496

* Now if you have a listing, do confirm if they resemble the folder names.

* Now proceed to delete them without mercy. Actually a good idea will be to move
them all to a single folder instead of deleting them.
$mkdir /media/disk/quarantine

$ find -i iname “*.exe” | xargs -i du {} | grep 496 | cut -f 2 | xargs -i mv {} /media/disk/quarantine

* Now after verifying that all those exe’s are the culprits, u can purge them all.

Simillarly look for Autorun.inf in the root folder of the drive. Read the contents, most probably it will be a virus file to initiate a trigger .exe

Google Webmaster Tools : Verification procedure for a Blogger account.

To use the Google Webmaster Tools for your blog, you must first add your blog and allow it to be self verified. This way you tell google, that this ‘site’ is indeed yours.

For a blogger account, the help is given here. If you choose the meta tag verification method for your blogspot blogs, here are the steps to get it verified.

Open your dashboard by visiting blogger.com. Proceed to Settings > Layout > Edit HTML > EDIT Template.

In the code provided copy the <meta> content you picked up from the google’s webmaster tools page. After saving the template, proceed to webmaster page and click on verfiy.

Also to update the sitemap url, proceed to http://yourblog.com/robots.txt copy the sitemap url and update it under Webmaster’s sitemap section.

Kingston Pen drives Technical Support in India

Please do not request for support on this page. Please contact the service centre from the link below or call customer care number provided.

Consumer and Service & Support for Kingston pen drives and other products in India.

Phone: 044 42015215
Toll Free No. 1860 425 4515.

Detailed listing of service centers:

http://legacy.kingston.com/india/support/service_center.asp

Bangalore Service Centre.

re-STORE (A Unit of Aforeserve.com Ltd)
No.2, 1st Floor, Chennakeshava Complex
HAL Airport Road, Marathahalli, Opp. Woodland Showroom
Bangalore-560037
080 42197817, 9611334587, 9945345656

Email id : techsupport_india@kingston.com,techsupport.india@kingston.com

 

Update:

For all those who are asking me to fix your pendrives – I am a not a Kingston service provider. What I have posted here is the list of service centers you can approach with your drive. They would normally check with your drive’s serial number to see if its still in warranty. Replacements are usually delayed due to huge backlogs.

Ubuntu Apache2 : Change default DocumentRoot /var/www

By default the document root folder for apache2 in Ubuntu is /var/www. This is where you can store your site documents.

In order to change the default site location to a different one, /opt/mysite use the following method. A detailed steps to install LAMP on ubuntu is given here.

To do this, we must create a new site and then enable it in Apache2.

To create a new site:

Copy the default website as a starting point.

sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mysite

Edit the new configuration file in a text editor “sudo nano” on the command line or “gksudo gedit”, for example:

gksudo gedit /etc/apache2/sites-available/mysite

Change the DocumentRoot to point to the new location. For example, /opt/mysite (make sure there is no space in your new folder name; /opt/my\ site/ will not work)

Change DocumentRoot /var/www to  DocumentRoot /opt/mysite

Change the Directory directive, replace <Directory /var/www/> to <Directory /opt/mysite/>

You can also set separate logs for each site. To do this, change the ErrorLog and CustomLog directives. This is optional, but handy if you have many sites

Save the file

Now, we must deactivate the old site, and activate our new one. Ubuntu provides two small utilities that take care of this: a2ensite (apache2enable site) and a2dissite (apache2disable site).

sudo a2dissite default && sudo a2ensite mysite

Finally, we restart Apache2:

sudo service apache2 restart

Shell script: Rename extensions of multiple files.

Shell provides easy way of renaming multiple files.

Eg: your directory has ’01 – Song1.mp3′, ’02 – Song2.mp3′, ’03 – Song3.mp3′ and you want to rename them to .txt. use the following commane.

$rename mp3 txt *.mp3

The above command renames .mp3 files to .txt.

An alternate script solution from here


#!/bin/sh
ls *.mp3|while read file
do
target=`echo $file|cut -d . -f 1`
#mv "$file" "$target.txt"
echo "$target.txt"
done

First test the above script by seeing the echo "$target.txt" output then uncomment the line above it and comment this line.

Search and replace text in multiple files.

I had a bunch of html files where a particular style sheet inclusion had to be removed from about 500 odd html files.

Knew this could be done through an sed script , but found a better one using perl from here.

export OLD_TEXT='<link rel=”stylesheet” type=”text/css” href=”style.css”>’

export NEW_TEXT=’some new text’

and use it in the perl command as follows.

perl -w -i -p -e “s/$OLD_TEXT/$NEW_TEXT/g” *.html

or use it against all .html files from the current directory using find and xargs

find . -name “*.html” | xargs -i perl -w -i -p -e “s/$OLD_TEXT/$NEW_TEXT/g” {}

Add to FacebookAdd to DiggAdd to Del.icio.usAdd to StumbleuponAdd to RedditAdd to BlinklistAdd to TwitterAdd to TechnoratiAdd to Yahoo BuzzAdd to Newsvine