Wednesday, January 23, 2013

How to Continuously Monitor your Internet Connection


The internet connection has been flaky for the past few days. It works fine for 10-15 minutes, breaks for about a minute and the connection is then automatically restored. This erratic on/off cycle repeats itself throughout the day.
It is most likely an ISP issue as the modem, the router, the DNS server, and the network connections seem perfect. Even power cycling the hardware failed to fix the problem.
While the ISP resolves the issue, I have to continuously monitor the Internet connection as certain actions – like submitting web forms – would fail if initiated while the computer is offline. Luckily, there isn’t a need to download another utility as the included ping command can itself help monitor the downtime.
PING Command

Ping to Monitor your Internet Connection

Go to Start -> Run and type “ping -t 8.8.8.8″ without the quotes. The “-t” switch is important as it means that the ping command will run forever unless stopped manually by hitting Ctrl + C. (8.8.8.8 is Google’s DNS Server)
The output of the ping command, as illustrated in the above screenshot, shows the live status of your Internet connection. If the status reads as “reply from 8.8.8.8,” the machine is online and in all other cases, the Internet connection is down.

Wednesday, January 16, 2013

Automatically Delete Older Messages in Gmail with Auto Purge


The Trash and the Spam folders in your Gmail have a unique auto-purge property and old email messages belonging to either of these labels are automatically deleted after a fixed period of time (30 days to be precise).
Gmail Auto Purge
Get rid of unwanted and older email messages with auto-purge in Gmail.
Auto-purging can help keep your mailbox lean and tidy.
For instance, if you have created a rule in Gmail that archives all your newsletter subscriptions to a particular label, these unwanted messages will live forever until you manually purge them. With auto-purging enabled, the older mails of a label are automatically removed from your mailbox.

How to Enable Auto-Purging in Gmail

You can’t enable auto-purging in Gmail for any particular label but there’s a simple Google Scriptthat will bring this missing functionality to your Gmail. The script will basically monitor messages belonging to a particular folder /label in Gmail and purge those that have exceed the retention time.
Here’s how you can get auto-purge to work inside your Gmail:
  1. Open Google Script and choose File -> Make a copy to copy it into your Google Drive.
  2. Set the value of GMAIL_LABEL to the label that you wish to auto-purge and PURGE_AFTER are the number of days for which you to retain a message in Gmail.
  3. Go to Run -> Initialize and grant the necessary permissions. This is your personal script and nobody else will ever have access to your data.
  4. Go to Run -> Install to install the auto-purge script.
That’s it. Exit the Google Script and it will continuously monitor that particular Gmail label in the background. If you need to disable auto-purging later, just open the same script in your Google Drive and choose Run -> Uninstall.