Varnish Nagios Plugin Rumi, September 24, 2013 Install To use this plugin you need to have varnishstat installed which is installed by default when you install varnish. Perl is also required for this plugin. If you don’t have Perl installed you can install in by running the command below sudo apt-get install perl or sudo yum install… Continue Reading
How to empty Table in MySQL database Daily with cronjobs Rumi, September 3, 2013 you can create a php script. truncatetable.php Example: <? $db_host = "localhost"; $db_user = "username"; $db_pass = "password"; $db_name = "databasename"; $connect = @mysql_connect($db_host,$db_user,$db_pass); @mysql_select_db($db_name); // Empty table $query = "TRUNCATE TABLE TableName01"; mysql_query($query); ?> Then setup the cronjob Continue Reading
Sticky header and footer CSS Rumi, July 24, 2013 HTML Code- <!– BEGIN: Sticky Header –> <div id="header_container"> <div id="header"> Header Content </div> </div> <!– END: Sticky Header –> <!– BEGIN: Page Content –> <div id="container"> <div id="content"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sit amet ipsum magna, et convallis sem. Nunc pulvinar magna vitae orci… Continue Reading
How do I line up 3 divs on the same row Rumi, July 24, 2013 Part one- <div> <h2 align="center">San Andreas: Multiplayer</h2> <div align="center" class="float-left">CONTENT OF COLUMN ONE GOES HERE</div> <div align="center" class="float-left">CONTENT OF COLUMN TWO GOES HERE</div> <div align="center" class="float-left">CONTENT OF COLUMN THREE GOES HERE</div> </div> And inside CSS file- .float-left { float:left; width:300px; // or 33% for equal width independent of parent width… Continue Reading
Creating Custom Built Debian 6 (Squeeze) Rumi, May 24, 2013May 24, 2013 There is a well documented official way to create standard Debian CDs. However, sometimes it is nice to have a CD or DVD which just contains a subset of Debian Packages to fit personal needs. The following script is made for creation of such a CD image. By default, it… Continue Reading
MySQLDump Shell script for backup Rumi, April 21, 2013 You can use the following script to dump mysql database and can add to crontab entry for daily backup! #!/bin/sh DAY=`/bin/date +%Y%m%d` TFILE="/backup/MYDB.$DAY.gz" mysqldump -u root -p'MYPASSWORD' MYDB | gzip > $TFILE echo "cache dump completed, dump script by rumi (hasan.emdad@mango.com.bd)" Continue Reading
Daily Shell Backup Script Rumi, April 19, 2013 #!/bin/sh DAY=`/bin/date +%Y%m%d` TFILE="/var/log/pdns-cache/$(basename $0).$DAY.csv" rec_control dump-cache $TFILE echo "cache dump completed, dump script by rumi (hasan.emdad@mango.com.bd)" Continue Reading
PHP-RRDTool installation on CentOS 5 Rumi, January 13, 2013January 13, 2013 Step-1 Adding Yum Repository Add the Reporforge repository. Then- Yum install php-rrdtool Alternatively, you can download the rpm from http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/php-rrdtool-1.4.4-1.el5.rf.i386.rpm Continue Reading
Nagios- Memory Check Plugin Rumi, January 6, 2013January 6, 2013 Dave the below code as check_mem.sh using nano and chmod it to +x. (file to be saved inside nagios libexec- such as /usr/local/nagios/libexec/check_mem.sh Continue Reading
Contact Form Maker or Creator for aspx Rumi, December 2, 2011 An interesting link and a pretty useful one if you're using Microsoft Expression base- http://www.ctrfx.com/form/default.aspx Continue Reading