Monday, 26 September 2011

Top 10 places to lose your cellphone

Have you ever lost your cellphone? Most of us know what it feels like. A mobile security company in San Franciso, called Lookout, has done the research and publish the following list.

1. Swimming pool
2. Taxi
3. Airplane
4. Bus or Subway
5. School
6. Airport
7. Changing room
8. Roof of your car
9. Restaurant/Bar
10. Purse

Why don’t you head over to Lookout Blog and see the nice info graphics yourself. They also have got Top 10 US cities with Cell phone loss or theft.

Thursday, 22 September 2011

How to disable Automatic Updates restart prompt

If you are using Windows XP with Automatic Updates on, you’ll be quite familiar with the dialog box below.

It becomes very annoying when you are really busy and the dialog box keeps on coming back. Well, finally I’ve got the easiest solution to get rid of it.
Just go to Start menu –> Run, type services.msc.

You’ll see the following window and right-click on Automatic Updates, choose stop as follow:

Right after you clicked “Stop”, the annoying "Do you want to restart your computer now?" dialog box will go away altogether with the system tray icon. Now you can focus on your work undisturbed.

Please note that you can only do this if you've administrative rights on your computer. This is not recommended for your company's computer. Disabling automatic updates may cause security risks for your computer. Hence, proceed only at your own risk.

Source : Microsoft Answers

Tuesday, 20 September 2011

Top 10 reasons why you should get a Mac

Well, I've never thought I'd write this post. In 2007, I've written a post about top 10 reasons why you shouldn't get a Mac. It was well reflected the real situation back then though. How things have changed in 4 years! Today Apple has become technology giant and even outgrow Microsoft in stock values.
So here I am, writing this post, why you should consider getting a Mac over a PC.
1. Mac OS and most softwares require no tedious activation procedures

Apple really target the mass market. What do I mean by that? Well, in general, majority of people all over the globe are lazy and stupid. While Microsoft is busy how to prevent their softwares from being pirated, Apple just focuses on the quality and target the general populace. The result? It is very simple to use. When I started using OSX, I was surprised to find out that no activation is required. When I install iWorks suite, no serial or activation process, it just installs and done. Most softwares install and uninstall process on Mac OSX is as simple as drag and drop.

2. Multi-Touch and gestures

Apple innovated multi-touch and gestures. Magic trackpad and Magic mouse are really fun to use. In Lion, swiping four fingers up to bring Mission Control and three fingers swipe left and right to switch full screen apps are really intuitive.

3. Services

Apple hardware are warranted by Apple. Period. This is their brand to protect, so they took care of it whenever you've got issue with either hardware or software. For Windows user, the PC vendor may push the blame to Microsoft or any other software provider and vice versa. Furthermore, you can extend AppleCare by up to 3 years and it covers almost anything that goes wrong.

4. It doesn't crash

This is not really true, but yeah majority of the time it doesn't crash. Let me put it this way, if Windows crash once a week, Mac will crash like twice a year.

5. iLife and Time Machine

There’s iCal, Apple Mail, Address Book, iPhoto, iMovie, GarageBand, iTunes, and iDVD. For Windows part, you've to download Windows Live essential and still no equivalent GarageBand and Windows Live essentials isn't as well integrated as iLife. Any Windows backup software I've tried are not as user-friendly and dummy proof as Apple Time Machine. This is not entirely Microsoft fault though. Due to a lot of anti-trust lawsuits, Microsoft simply cannot bundle these apps like Apple do. I guess that's a small price to pay for when you are a market leader.

6. Macs don’t need an anti-virus software

I agreed that there is Anti-Virus for OSX as well. But unless you are clicking everything on the internet and entering your password whenever there's a prompt, you simply don't need anti-virus. OSX underlying OS, Unix, is too strong in security for any bad boy.

7. Long-lasting Battery life

Battery life on Macbook, Macbook Pro and Macbook Air are all fantastic. This is as a result of integrating hardware and software so well. I sincerely say that Windows notebook don't even come close when you compare battery life with the same size and weight as Macbooks family.

8. Price

You may probably say What!? Macs are more expensive. Yes it is true if you compare the initial cost. Then you are comparing Apple with Orange (no pun intended). The total cost of ownership of a Mac is a lot less than a PC. Apple hardwares hold their value over the years. Let's say you spend $999 for Macbook Air today. A year later, that Macbook Air can fetch at least $400. You can count yourself lucky if your one year old PC notebooks get half of that resale value.

9. Macs run Windows, if you need to. PCs are not able to run Mac OS.

This is a bit unfair to include as advantage as this reason is mainly due to Apple not allowing their OS to run on third-party hardware to protect quality of service. But at least if you need to run OSX and Windows legally for whatever reason, you've got no choice but to use Mac.

10. Design

The last but not least is design. Apple products have the feel-good quality which always gives you the comfort that you are using a great product. From the iMac to the new Macbook, Apple's design has remained flawless compared to the competition. Unibody Macbooks are really durable and amazingly beautiful! Apple had said they've left their competitors years behind when they introduced unibody Macbooks and it really turns out to be the case.

In conclusion, I'd encourage you to invest in Apple hardware nowadays. But remember, we can't take technology for granted though. Steve Jobs, the mastermind of Apple's success, has already left his CEO role at Apple and Windows 8 demos look quite amazing. So Mac vs PC war will not end in the foreseeable future.

How to edit Powerpoint template

This is just silly. I can’t figure out how to update the year in the left corner of my company powerpoint slide. I’ve tried footer and header, no help at all. Finally Google comes to rescue.

So I think this might be worth to share with you all as well.

Just go to View menu –> Master –> Slide Master

That’s it though! You can edit any part of the template as you wish. If you want to save that as new template, you can easily do so via File –> Save As and choose Design Template as Save as type.

Source :

Saturday, 17 September 2011

How to renew dhcp lease in Linux

I’ve tried this command on Debian/Ubuntu, but since dhcpclient is the universal across all distros, I expect this to work on all *.nix variants.

First thing to take note is if you are ssh to the server, you should be careful before executing the commands.
sudo dhclient –r

The above command will cause all network adapters to release DHCP lease. So if you are ssh through one of the DHCP interface, you’ll get disconnected and unless you’ve physical or console access, there is no way to bring it back.

So I’ve come up with nice commands that you can use even if you don’t have console or physical access to the server. But you should be able to ssh to the host by using hostname in case DHCP server lease a new different IP addresses. If DHCP server responded with the same IP address, you won’t even get disconnect from ssh session.
sudo dhclient -r; sudo killall -9 dhclient

That’s the command I’ve used frequently and very convenient for me.

Source : Ubuntu Manpages

Friday, 16 September 2011

Change hostname in Ubuntu or Debian

If you’ve changed your mind about your Linux hostname or you’ve set to wrong hostname, here is how to fix it.

Firstly, I’ve tried the following command:
$sudo hostname mybrandnewname

But this will revert back to prior hostname whenever the machine reboots. So how can you change it permanently? First you'll need to edit /etc/hostname file
$sudo vi /etc/hostname Then delete the old name and type whatevername you desire

It is also advisable to change new hostname in /etc/hosts file

Source : UbuntuManual

Thursday, 15 September 2011

How to add new user and grant permission?

Once you’ve got your new favourite Linux distro installed, you’ll need to add users and grant permission as per your organization requirement.

The steps are very simple and straightforward.

sudo adduser

If you want to grant a user to all permissions as root, you should add that user to admin group. For example :

sudo adduser jason admin

Make sure the line “%admin ALL=(ALL) ALL" is present in the /etc/sudoers. The below is the screenshot of sample config file.

After that you might want to set specific password for the new user. You can do this by using the following command:

sudo passwd

Source : AskUbuntu

Wednesday, 14 September 2011

How to config ubuntu/debian to boot in text mode

I like Linux boxes to boot directly to terminal mode. If you’ve just moved to Ubuntu distro from Red Hat/ Fedora, you’ll think about changing the inittab. Well, bad news is in Debain or any of its derivatives, runlevels 2 to 5 are the same multi-user with display GUI. So if you type, sudo init 3, nothing will happen.

So here is how I make Ubuntu to boot into text mode by default. The requirement for this is you have to use grub as boot loader.

Just edit the /etc/default/grub using any of your favourite text editor, look for the line


Then changed it to


The following is the screenshot for what my grub file looks like after the changes.

After that save the file and run sudo update-grub. That’s it. Starting from next reboot, your ubuntu/debian variants will start in text mode.

Source : UbuntuForums

Tuesday, 13 September 2011

How to reverse a string using sed

I had got issue with having to reverse a string of number manually. Of course, that gave me a big headache. Thanks to Peter from Catonmat, I’ve got the following sed script.


As you can imagine, this is quite complicated, but luckily he’s given nice explanation as well.

sed '

/n/ !G



s/.// '

The first line "/n/ !G" appends a newline to the end of the pattern space if there was none.

The second line "s/(.)(.*n)/&21/" is a simple s/// expression which groups the first character as 1 and all the others as 2. Then it replaces the whole matched string with "&21", where "&" is the whole matched text ("12"). For example, if the input string is "1234" then after the s/// expression, it becomes "1234n234n1".

The third line is "//D". This statement is the key in this one-liner. An empty pattern // matches the last existing regex, so it's exactly the same as: /(.)(.*n)/D. The "D" command deletes from the start of the input till the first newline and then resumes editing with first command in script. It creates a loop. As long as /(.)(.*n)/ is satisfied, sed will resume all previous operations. After several loops, the text in the pattern space becomes "n4321". Then /(.)(.*n)/ fails and sed goes to the next command.

The fourth line "s/.//" removes the first character in the pattern space which is the newline char. The contents in pattern space becomes "4321" -- reverse of "1234".

But what I want is the output to be separated by “.” aka dot character. So here’s what I come up with.
[code]$ echo 123456789 | sed '/n/!G;s/(.)(.*n)/&2.1/;//D;s/.//'[/code]


Still there’s one small issue, I don’t want dot at the start of the string. So after reading his explanation, I realize that I need to put one more “.” to be replaced at the fourth line. This is final script.
[code]$ echo 123456789 | sed '/n/!G;s/(.)(.*n)/&2.1/;//D;s/..//' [/code]

So obviously, if you want “,” aka comma instead of dot, you can just substitute it. If you are curious about getting to know sed, why don’t you head over to That site got so many cool sed one liners.