• Remove WordPress Maintenance Mode

    Sometimes, upgrades fail at some point for some reason. That will leave your site in maintenance mode and unusable. That’s the “Briefly Unavailable for Scheduled Maintenance” that we see while the upgrade is on-going or if it fails. So how do we get out of the maintenance mode?

  • Agoda Hotel Rate Search Plugin for WordPress

    Here’s my first plugin for 2012. It’s a plugin to show the agoda seach widget inside your post. If more applicable for travel websites who are also Agoda Affiliate Partner. upload agoda_hrs.php to plugins folder activate the plugin set client id, country id and city id in the settings menu add [agoda_hrs] shortcode on your…

  • comfort Host Panel Down

    I had a major database problem in one of my sites the other day (more on that later). Though I was able to rectify that with my backup, I wanted to restore my VPS from it’s daily backup using the control panel of ComfortHost. Unfortunately, I cannot access the main site and neither the panel…

  • How to Get The First File in Unix

    In case you are looking files using ls or find command and only want to get the first file found, the command would be like. ls -l /any/path/filename*|sed -e ‘s///,/g’|awk -F “,” ‘{print $NF}’|head -1 Of course, you can also use it in find command. find /any/path/ -name “filename*” -type f|sed -e ‘s///,/g’|awk -F “,”…

  • How to Display Seconds in Unix File Timestamp

    Apparently, there’s no native shell command to show the seconds portion of a unix file timestamp. The nearest to this functionality is stat. However, it’s not always available in unix systems. I’m using HP-UX and it’s not installed on our server. Instead, I needed to use a one-line perl program shown below. perl -e .foreach(@ARGV){$t…