Timezone conversion in python -Easy way

This lib i found most usefulll python-dateutil. sudo pip install python-dateutil from datetime import datetime from dateutil import tz date_str = "2014-08-08 19:18:01" fmt="%Y-%m-%d %H:%M:%S" from_zone = tz.gettz('UTC') to_zone = tz.gettz('America/New_York') utc = datetime.strptime(date_str, fmt) utc = utc.replace(tzinfo=from_zone) print utc.strftime(fmt)...

Killer mailer script in Python

Hey guys i always needed a mailer script which can send me hourly/daily/weekly updates of my diffrent programs running on linux box. I tried sendmail and mutt but they were not much impressive. I made a python script for myself...

Functions in shell script

Have lot of repeated shell code ? try writing function in that :) writing functions in any languages lowers the headache of any programmer , it implements DRY (Do not Repeat Yourself!) rule and that’s cool to why would i...

Using MySQL dump

HI All, mysqldump is a very handy and useful command for keeping backup of your Db or to migrate them to another server. lets see how can we use it in different way .. To take a backup of data...

Checking MySQL Database Size

Hi all , in this post i am going to show you how to check current mysql database size, below queries are tested on Mysql 5.5.8 Just fire below queries on your mysql db you will have your results ready...