Google Drive 5GB For Free

Based on rumors, it looks like Google will release a new service called Google Drive in a couple of weeks. Google Drive will compete with Dropbox, iCloud, Box and host of other online storage and collaboration services.

The word on the street is, Google Drive users will receive 5GB for free, a much higher value than previously anticipated. Potentially, Google can sweeten the deal by making the integration of its other services a key selling point.

Integration with GMail and Google Docs can take Google Drive over the top above other competitors. I would pay to see Google Docs having the ability to save files on Google Drive. If Google were to allow such a thing, it would be an instant hit.

What a combo that will be.

Getting Ready For Ubuntu 12.04 LTS

Ubuntu 12.04 LTS (Precise Pangolin) is just around the corner. I’ts time for an OS upgrade. I’ve been playing around with Ubuntu 12.04 Release Candidate the last few weeks. By the way, my desktop still runs on Ubuntu 10.04. I am considering upgrading my desktop to the next LTS or Long Term Support release.

This article will guide you how to prepare for Ubuntu 12.04 when it comes out in a few weeks. I will also show what to consider, what to do, what to backup, what to carry over, and what programs that you can possibly leave behind.

To Upgrade Or Not Upgade

First of all, should you upgrade or not? That is question. I thought about staying with Ubuntu 10.04 LTS as long as possible. Technically, Ubuntu 10.04 LTS is still supported until spring of 2013, but just like everything else, all good things must come to an end.

One of the things about staying with an older distribution is, you don’t get to play around with the latest and greatest. Upgrading to the Ubuntu 12.04 is an option along with many others. Ubuntu has taken such a beating the last year. In some ways, it was well deserved. Users abandoned Ubuntu by droves because they believed the changes were just too much.

A large part of the blame went to Gnome 3 and Unity. Nevertheless, staying with one distro your entire lifetime is not possible. It’s just like having a car, you will have to get a new car eventually. So, why not upgrade with a Ubuntu 12.04 LTS version. It’s a perfect time to do it.

Upgrade or Fresh Install

The next question is, should you upgrade or do a fresh install. There’s nothing like a newly fresh installed OS. Whether its Windows, Mac, or Linux, a fresh install usually breathes new life to the OS. The downside is, a fresh install usually requires a massive update. Updates usually takes an hour or so. It may require multiple reboots as well.

Upgrading an OS may break certain software that you are currently running. The transition is not always as smooth as can be. There might be some legacy software or drivers that may no longer work with the new OS. Face it, upgrades are not as clean as a fresh install. I usually prefer a fresh over an upgrade.


One of the first things you need to do before you begin the upgrade process is to make sure you have backed up all your documents in your Home folder. I like to use use an external USB to backup all my documents, for a couple of reasons, (1) they are easy to mount and unmount, (2) it’s easy to perform backup and restore. It doesn’t get any easier than dragging and dropping files and folders.

If you are running some kind of version control software such as Subversion or Git, it’s probably a wise idea to submit your commits before the upgrade. If your repository is located locally in your system, you should back it up, and consider storing your repository in a separate location other than your desktop, since you are going to be upgrading constantly.

If you are running Virtualbox, you will need to backup your Virtualbox Virtual Machines folder as well. The Virtual Machines are quite large, averaging 10GB or so, depending how you set up your virtual machines. You can easily restore VMs in your new fresh distro as long as you performed the proper backup process.

If you use bookmarks, back them up as well.

A List of Applications

Just like any other OS, whether its Windows, Mac or Linux, we all have our favorite list of applications we can’t live without. List all the software that you need to install on the new distro. Some of the software on your list, may already be in the distro that you will be migrating into, so you can cross them off the list.

Here’s my list:

Gimp, Dropbox, Filezilla, Audacity, Update to latest Firefox, Google Chrome, Virtualbox, Bluefish, Ubuntu-restricted-extas, Subversion, Update the video driver, Xorg RandRRotation, Import Bookmarks, Handbrake, Ubuntu Tweak, Printer and Scanner software, MDB Viewer, Aptana, Cheese Webcam, OpenShot Video Editor, VLC, WinFF, FFMPEG, Mixxx, Openshot Video Editor, and Pitivi Video Editor.


Don’t expect everything to work just like before. Gnome 3 and Unity are quite stable, but they are remarkable different than Ubuntu 10.04. If you have been using Unity or Gnome 3 for a while, your transition will be a lot more smoother than mine.

Anyways, these are just several tips to consider when upgrading to Ubuntu 12.04 LTS. If you have other ideas you like to share, please share them below.

Windows Phone In A Horse Race

Have you ever watched a horse race with two horses running neck to neck while a third horse lags far behind? Yea, that third horse is Windows Phone, trailing behind the iPhone and the Android by a wide margin.

It’s hard enough to play second fiddle. How much more a third wheel. I think the sooner the better it is for Microsoft to realize that this gap is too wide to make up to make this a competitive race.

Dropping out of the race might be a smarter option for Microsoft, but then again smart choices and Microsoft sometimes don’t belong in the same sentence. Microsoft has made many flopped ventures. Who hasn’t!

Clearly this is a two-horse race, and it’s not changing anytime soon.

What To Do With Your Old PC

There are many reasons why people upgrade their computers. It’s usually because the old hardware no longer works. Maybe it was simply too slow, or it doesn’t support any of the newer technologies. Whatever the case may be, people will usually end up with some old hardware that destined for donation or the scraps.

Run Linux

Before you part ways with your old hardware, you should really consider holding on to it a little while longer. I recommend that you install Linux on it. Why? Why not. Linux is fun operating system that has been around for almost 20 years. It’s powerful, educational, and most of all, it can breathe new life into that old crusty hardware.

Which Distro?

Linux comes in many flavors, which are called distributions, or distros for short. Which Linux distro is good for you? Well, it’s up to you. There are many, many to choose from. There are currently over 420 Linux distributions according to GNU/Linux Timeline. Most distros are active, with a few that are no longer supported.

Stick With The Popular

Debian, Ubuntu, Linux Mint, Redhat, Fedora, CentOS, and Slackware are just a few of the more popular distros. I recommend that you start with these distros. They are popular, well supported, and have thousand of users willing to help. Get familiar with the respected support forums in case you have an issue or two.

Try Before You Install

Most popular Linux distros will give you the option to try before installing it. I suggest that download the ISO images from directly from the distro websites. You will be asked to create a Live CD or DVD from the images, where you can boot from and run Linux. If you don’t like it, move on to the next one, until you find a distro you are comfortable with.

If you found one you really like, install it. Frequent the support forums for tips, solutions, suggestions, etc. Update your distros to keep up with the latest security patches and developments. Most of all, enjoy Linux.

Validate IP Addresses in PHP

Let’s say you were given a task to validate an IP address in a custom script. One approach is to use regular expressions and use pattern matching to see if user input is correct or not. In this example, we will use a regular expression below to validate IP addresses.

We assume user input is done via a form. First things first, we need to sanitize the input. Once sanitized, we can then test the input against the regular expression using a PHP function called the ereg().

// the regular expression for valid ip addresses
$reg_ex = '/^((?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))*$/';
// sanitize input from form
$ip_address = addslashes(htmlspecialchars(strip_tags(trim($_POST['ip_address']))));
// test input against the regular expression
if (ereg($reg_ex, $ip_address)) { 
   // ip address is valid
} else {
   // ip address is not valid

The result is, we now have a facility to check the validity of IP addresses. We can now perform additional steps when the IP address is valid, or display errors if the IP address is invalid.

MySQL mysql_connect new_link

I want to share a database connection access problem I had last week, while working with a custom PHP script inside WordPress. I had created this WordPress Page Template containing some PHP code that needs access to the database. The problem was that the database connection for my custom script overwrote the WordPress database connection that was previously establish, causing certain parts of WordPress to not display properly.

It took me a while to figure out that it was the newer database connection of my custom PHP script that was causing the previously established WordPress database connection to disappear. Hence, certain parts of the WordPress page were not displayed. Little did I know, that the fix was quite simple. So, here’s a sample of my mysql_connect code. Prior to this line, I’ve already set the variables.



The Fix

Simply add a fourth parameter called new_link and set it to TRUE.


What this does is basically telling mysql_connect to establish a new connection, while keeping the older mysql_connect connection around, in case we need to access it at a later time. It’s amazing how one little switch in a command can make a huge difference to this seemingly simple code. Anyways, adding a fourth parameter and setting it to TRUE was the solution.

Fix Flashback Trojan on Macs

As reported yesterday, over 600,000 Macs are infected by a Flashback Trojan botnet. The good news is, Apple has patched Java. You can visit Apple’s Support website and download the latest update.

Just a little background on the Flashback Trojan botnet per ZDNet.

Flashback was initially discovered in September 2011 masquerading as a fake Adobe Flash Player installer. A month later, a variant that disables Mac OS X antivirus signatures updates was spotted in the wild.

In the past few months, Flashback has evolved to exploiting Java vulnerabilities. This means it doesn’t require any user intervention if Java has not been patched on your Mac: all you have to do is visit a malicious website, and the malware will be automatically downloaded and installed.

Another variant spotted last month asks for administrative privileges, but it does not require them. If you give it permission, it will install itself into the Applications folder where it will silently hook itself into Firefox and Safari, and launch whenever you open one of the two browsers.

If you don’t give it permission, it will install itself to the user accounts folder, where it can run in a more global manner, launching itself whenever any application is launched, but where it can also more easily detected.

As a precaution, you should probably update to the latest Java release from Apple’s website. Just choose the OS X version you are using. I have Lion or OS X 10.7.x. Download and run the package. The patch takes less than one minute to install. It’s a quick and easy fix.