Friday, October 2, 2009

Firefox freezes on startup

Just updated to Firefox 3.5.3, expecting some more security fixes on my Windows XP desktop but darn! Every time I start Firefox, it freezes instantly. I killed the process but the next time, again. I tried running it in safe mode. You do it by running :
"D:\Mozilla Firefox\firefox.exe" -safe-mode
What it does is starts Firefox like a fresh install, with all add-ons and extensions disabled. What can go wrong here? A lot. It will freeze again. This time I look for whats that is being shared in the safe mode as well? HISTORY!

I opened my Firefox profile, by running:
%APPDATA%\Mozilla\Firefox\Profiles\
I looked inside the folder, and found the size of my profile folder to be 450MB! Further investigation revealed this file called places.sqlite which had a size of 370MB, and what was it? It was my 9 months of history. One simple solution was delete the file, and firefox will rebuild it from scratch. But I could never afford to lose all those pages. So I downloaded the Firefox SQLite Manager. It helped me open up the file and edit the tables. So I deleted sorted the pages by last visited and let 5000 entries remain, out of the 85,000 that were there. It reduced the size of the file to 60 MB, and FF is now up and running. So, it was nothing to do with the update, I guess, although I have sent them a feedback. Oh God! How I hate all other browsers!

Sunday, August 16, 2009

Yay! I have a Demonoid Account

The dream account for every P2P participant is to get a Demonoid account. Somebody tells you they have the most active and fastest trackers of all and you rush to their site to register for an account but wait, 'Registration is Closed'. You read the FAQ section on Demonoid and they say that registrations usually open for the first 2-3 days of the month, alternatively you can use a demonoid invitation. You wait for the 1st of the next month, probably visiting demonoid every day to see if registrations are on but they don't just seem to update the site!!

You look all over the net and find scores of sites which claim to be sending Demonoid invitation codes to those who register with them. WARNING!! They will sell your email id to some spammer. You already have enough spam so please don't bother them.

So you get all pissed off and forget it. Then you come across this noble and charitable group on Facebook called Demonoid. Even they claim the same but don't ask for your email id so you go on and join it. Within a week you get a message from the group owner that whoever wants invitations must contact him by replying. Half believing him you do the same and whoopeee!! in 2 minutes you see that the guy has sent you an invitation code, that WORKS.

Congratulations! Go Seed.

Saturday, August 1, 2009

Windows to Linux (Ubuntu) - 1

Its been two full weeks since I installed Ubuntu inside Windows XP (click here to see how) and and I have booted into XP just once (Oh God! I love Windows' games). I'll say thats not bad for a person who has always been critical of non-Windows systems for the fact that the variety of software packages just can't be compared. I did miss Windows for two days, which I spent getting Xampp to a good working condition and I even pulled my hair at the mess wrong (too less or too much) permissions can create. After that, it was a smooth drive. Installing new software can't be easier - just one command. Startup and Shutdown speeds are also very impressive. Memory consumption is less (thanks to no Avast and no ZoneAlarm) and firefox performs better although I can't update it to the latest 3.5 as Firefox for Ubuntu is customised and it takes a few months for the latest version to be customised.

Games aside, Ubuntu is a brilliant OS to work on, whether you are a developer or a casual user. Whichever software you may have been using, there is an alternative available for free ("Free as in Beer, and Free as in Freedom") in the Open Source world. If you just can't work without MS technologies like Silverlight or the open source alternatives don't seem to fill the place of your expensive software, then its no compulsion (obviously!).

Now, let me see more of it to write more of it.

Wednesday, July 29, 2009

Using PHP from the Command Line (Terminal) in Linux with a xampp install

This is for those who are using the xampp server. If you are using the Generic Linux apache and PHP packages, use you package manager to download php-cli .

If you are using xampp, you already have the php-cli library. In the terminal, type:

/opt/lampp/bin/php {input file} {arguments}

Done! If you don't like using /opt/lampp/bin/php every time, you can set php as an environment variable for /opt/lampp/bin/php.

To do this, go to terminal and type:

php=/opt/lampp/bin/php
export php

if you are using Bash Shell (the default one in Ubuntu), you can use this shortcut:

export php=/opt/lampp/bin/php


and reboot.

now you can use

php {input file} {arguments}

Dual Booting Ubuntu Linux in Windows

It will not be wrong to say that installing Ubuntu in Windows is the easiest thing to do for anybody. All you need is Windows already installed, a CD of Ubuntu (which you can order or download from ubuntu.com) and I recommend atleast 12 GB of free space, How do we do it?

  • Boot into Windows.
  • Insert the Ubuntu CD. On autoplay, you will be given three options, select "Install inside Windows".
  • Select the appropriate drive. For installation size, go for the maximum that your free space allows.
  • Set the username and password and hit Enter.
  • Installation takes 6-7 minutes and asks you to reboot.
  • Reboot and there you go, select Ubuntu in the choice of OS that you get.

Wednesday, July 15, 2009

Drupal - Hiding post information in Acquia Marina

You decided that you don't want the author and date to be displayed below some particular node types but don't know what to do. Th standard way is this:

  • Go to Themes on your Admin page
  • Click on Configure on the top of the page
  • On the right, you have a column 'Display post information on' , uncheck the content types you don't want the post info to be displayed on and click Save Configuration.
Most probably this will remove the post information, but there are chances that it doesn't. This is because what you just changed were Global Settings and you might be using your theme's custom settings. this is specially the case in Acquia themes which are highly configurable. In this case:
  • Go to Themes on your Admin page
  • Click on Configure next to the theme you are using
  • Navigate through the fieldsets like this Theme-specific settings >> Node settings >> Author & date >> Default
  • Uncheck the Check Boxes as required and Save Configuration. This will disable Author and Date from all content types.
  • Now to make the change for select content types, navigate to the same place and you will find a CheckBox labeled "Use custom settings for each content type instead of the default above". check it and select your Custom Settings from the following Fieldsets.

Tuesday, July 14, 2009

Daemon tool pro error : -1

I just repaired my Windows XP, hoping that all minor errors will be gone but, when I opened the Daemon Tools panel all my virtual drives were gone. I tried creating one and got the error:
Daemon tool pro error : -1

Soon i was Googling to find a solution to the problem. I found none but figured out the problem. When you repair Windows, it rolls back all the drivers installed to the default ones and that is what caused the problem. to resolve, follow these steps:

  • Right click My Computer
  • Select Properties
  • Select the Hardware tab
  • Click on Device Manager
  • Look for SCSI and RAID controllers - It will already be expanded and there will be a cross on its icon (not visible in image) which indicates that its not functioning.
  • Right Click on ANNxxxxx IDE controller and select Update Driver
  • Update using default options.

I you cannot see the SCSI and RAID controllers option in you Device manager, you need to reinstall Daemon Tools.

Saturday, July 4, 2009

Linux (DSL) and GCC on Windows using VirtualBox

If you need GCC and cannot leave Windows this method is the most viable, in terms of both memory and time.
First, you need to download three things:
Install VirtualBox like any other application.

Now you have to install dsl on a virtual Hard Disk on VB (virtualbox).

This is the method that I used (source: http://blogs.sun.com/AngeloJ/entry/virtualbox_and_dsl_damn_small )

(1) Create a New VM

Click the "new" icon and follow all the defaults ( note: I did not change any of the default settings the first time around )

(2) Boot from the DSL ISO image

Click on the "CD/DVD-ROM" on the "Details" tab

Click on the ISO radion button, then select the dsl *.iso file you just downloaded

(3) Boot the DSL VM from the ISO

Click the "Start" icon

... after a few boot screens you should have a working desktop

(4) Install to Hard Drive

This is the only tedious step, since you have to create your hard drive, virtually....

click the terminal icon on the bottom left of the screen in the panel

- type "sudo -s"
- type "cfdisk"
- Select "Y" when asked Do you wish to start with a zero table
- You will now see your cfdisk applicaton. Use the arrow keys and select "NEW"
-
Select "Primary" then select the size (by default it should be 2GB, but VirtualBox will grow this on-demand )
- Select "Bootable" (you see the word "Boot" under the Flags coloumn)
- Select "Write"
- When prompted with a (Y/N) type "YES" and hit enter.
- Select "QUIT"
-
now back at the command prompt type "mkfs /dev/hda1"
- now type "dsl-hdinstall"
- you will be prompted for the target drive type "hda1" and press enter
- Select "Y" for multiuser logins
- Select "Y" for ext3 filesystwm
- Select "Y" to continue.
- Select "Y" when asked "Proceed to install a boot loader"
- Type "g" for GRUB
- Type "Y" when prompted for reboot
- You will see DSL shut down and press "Enter" when prompted
-
Important: At the VirtualBox boot screen, click "Machine->Pause" from the Menu
- Click "Devices->Unmount CD/DVD-ROM" from the Menu
-
Click "Machine->Resume" from the Menu, and continue booting from the Hard Drive
- You should be prompted to enter a password for the "root" user and the "dsl" user.
- If it starts and you see your DSL desktop you have succesfully intalled DSL to your Hard Drive!


Installing GCC on DSL

Run the web browser inside dsl and download gcc from http://mirror.internode.on.net/pub/damnsmalllinux/mydsl/system/gcc1-with-libs.dsl

Go to the terminal and run this command

sudo mydsl-load gcc1-with-libs.dsl


There you go.

Alternatively, download GCC in Windows and transfer to dsl using a pendrive and run the same command.

Sunday, June 21, 2009

Drupal Tutorials, Tips and tricks - Introduction

This post onwards, I will begin a series of Drupal tutorials, tips and tricks starting from basics.

As you might be aware, Drupal is one of the most popular Content Management Systems (CMS) available. For those who don't know what a CMS is, Wikipedia defines a CMS as :

A content management system (CMS) is a computer application used to manage work flow needed to collaboratively create, edit, review, index, search, publish and archive various kinds of digital media and electronic text.

What this means in layman's terms is that a CMS like Drupal can be used to make any possible kind of Website. Drupal has been made on a PHP-MySQL framework and is an Open Source Application, which means that its source is available to everyone for no cost. If you are not a programmer, don't lose heart as most of the work in Drupal is done through an Administrative Panel which requires no programming skills.

Now the question arises "Why Drupal"? We have the very popular Joomla with us as well, then why should we use Drupal? This is a question which haunts every person starting up with learning a CMS. This answer is better answered by this IBM consultant on this page.

Search for differences and comparisons between the two on Google and you will realise that Drupal is better written, better documented and is more powerful than its nearest competitor Joomla.

A major distinguishing feature between the two is the Drupal Community which is very actively involved in making modules

What kind of sites can be built using Drupal? social networking, community blogging, photo gallery, e-commerce, tutorials, travel and anything you can think of. From the simplest to the most complex sites. To have a look at various sites built using Drupal, visit http://www.drupalsites.net/ .

Sunday, May 31, 2009

PHP Regular Expressions Cheat Sheet

The following should be escaped if you are trying to match that character

\ ^ . $ | ( ) [ ]
* + ? { } ,

Special Character Definitions

  • \ Quote the next metacharacter
  • ^ Match the beginning of the line
  • . Match any character (except newline)
  • $ Match the end of the line (or before newline at the end)
  • | Alternation
  • () Grouping
  • [] Character class
  • * Match 0 or more times
  • + Match 1 or more times
  • ? Match 1 or 0 times
  • {n} Match exactly n times
  • {n,} Match at least n times
  • {n,m} Match at least n but not more than m times
  • More Special Character Stuff
  • \t tab (HT, TAB)
  • \n newline (LF, NL)
  • \r return (CR)
  • \f form feed (FF)
  • \a alarm (bell) (BEL)
  • \e escape (think troff) (ESC)
  • \033 octal char (think of a PDP-11)
  • \x1B hex char
  • \c[ control char
  • \l lowercase next char (think vi)
  • \u uppercase next char (think vi)
  • \L lowercase till \E (think vi)
  • \U uppercase till \E (think vi)
  • \E end case modification (think vi)
  • \Q quote (disable) pattern metacharacters till \E
  • Even More Special Characters
  • \w Match a "word" character (alphanumeric plus "_")
  • \W Match a non-word character
  • \s Match a whitespace character
  • \S Match a non-whitespace character
  • \d Match a digit character
  • \D Match a non-digit character
  • \b Match a word boundary
  • \B Match a non-(word boundary)
  • \A Match only at beginning of string
  • \Z Match only at end of string, or before newline at the end
  • \z Match only at end of string
  • \G Match only where previous m//g left off (works only with /g)
For a more detailed study on Regular Expressions, visit this.

Thursday, May 21, 2009

How to schedule boot scan in Avast AntiVirus?

The best possible way to scan your computer for infection using Avast is to schedule a boot scan. A normal boot scan may take upto 45 minutes to complete. The following are the steps to schedule a boot scan:

  • Open your Avast panel.
  • Right-Click anywhere in between the panel.
  • Select the option "Schedule Boot-Time Scan....".

  • Next Select the options as you desire. I recommend them as in the image.


And there you go. Just restart your system, sit back and relax.

Sunday, April 5, 2009

Which is the best Free Anti Virus?

The first thing that comes to your mind when thinking of PC security is an Anti Virus. There are quite a few free anti virus available, the most popular being Avast, AVG and Avira. Before installing any, just have a look at the test reports on the page http://www.av-comparatives.org/comparativesreviews/main-tests

Avast and Avira perform almost equally, but I'll say that Avast has an upper edge because of its Boots Scan capability. Also Avira free version doesn't have rootkit protection but avast free version has :) AVG is not recommended, too many false positives.

A unique feature in AVG is its Link Scanner, but its not much effective. Use Web Of Trust as an Add-On for your Browser (which I recommend to be Firefox) instead.

We also have the less popular NOD32 and BitDefender. The problem with these is that they are too slow at scanning and are not updated as regularly. In terms of updates, again its Avast which gets the pie. It updates every 4 hours!

I personally use Avast! have been using it along with SpyBot, Zone Alarm and Spyware Blaster for two years now and without any infection.
Also all these are very compatible with each other, so no crashes.

Safe Computing!

Sunday, March 22, 2009

HKLM\Software\UAC* key prompt in RootKitRevealer

After about a month of troubled computing, I finally ran the rootkitrevealer and the first prompt that I got was that of the key HKLM\Software\UAC*
If you also get it, chances are that you have been rootkited by Win32:Rootkit-gen.
A lot of googling revealed nothing as the rootkit team was unaware of the origin of the key.

So, I just started XP in safe mode and started Avast! Antivirus (Free Edition) and it detected a trojan in my operating system memory and recommended a boot scan.

To see how to schedule a boot scan click here.

The bootscan revealed 9 files in system32 infected by the Trojan Horse "WIN32: Fasec" and it had infected dll files in the System32, Temp and System32/drivers folders which not to my surprise were named as UACqumepxb.dll , UACdnberxns.dll etc, so you see the names are like UAC*. I just moved all the files to Chest (although I was prompted that the files i am about to move are System Files) as I was pretty sure that the DLLs were generated by the trojan and wrere named like UAC followed by a random string.

And now another RootKitRevealer scan doesn't show those keys!

It also solved another problem. my C: was not being mounted in the RKR scan which is now being scanned as well.

This is what my Scan Report looked like, it can be found in C:\Program Files\Alwil Software\Avast4\DATA\report\aswBoot.

03/22/2009 19:59
Scan of all local drives

File C:\WINDOWS\system32\drivers\UACbqumepxb.sys is infected by Win32:Rootkit-gen [Rtk], Moved to chest
File C:\WINDOWS\system32\UACdnberxns.dll is infected by Win32:Fasec [Trj], Moved to chest
File C:\WINDOWS\system32\UACiorjdptm.dll is infected by Win32:Fasec [Trj], Moved to chest
File C:\WINDOWS\system32\UACqjbpjwbm.dll is infected by Win32:Fasec [Trj], Moved to chest
File C:\WINDOWS\system32\UACwpwcdooe.dll is infected by Win32:Fasec [Trj], Moved to chest
File C:\WINDOWS\Temp\UAC828d.tmp is infected by Win32:Fasec [Trj], Moved to chest
File C:\WINDOWS\Temp\UAC8608.tmp is infected by Win32:Fasec [Trj], Moved to chest
File C:\WINDOWS\Temp\UAC9e24.tmp is infected by Win32:Fasec [Trj], Moved to chest
Number of searched folders: 15607
Number of tested files: 148765
Number of infected files: 8

Sunday, March 1, 2009

Getting Youtube Videos to run on your phone

So you have just seen a video on You Tube and are wondering how you can run it on your phone which supports only 3GP videos, like my Nokia 5300, never mind if it plays MP4 or AVI too, the steps are the same.

First of all you will have to download and install the following softwares, don't frown, they are all freewares and they are not paying me any commission.

Real Player

Doremisoft FLV to 3GP Converter

DVD VIDEO SOFT

Now go to your favourite video on You Tube or any other site for that matter.

Right Click on the video and click on "Download this video to Real Player".

Now run the FLV to 3GP Converter and select your input and output files, and you get a 3GP video.

Now, if this does not run on your phone, you will need DVD Video Soft to decrease the resolution of the video. Thats pretty easy, select your input and output files and from the Presets drop-down list, select the appropriate resolution and you are done!