Apache server stats with small and useful bash script.

2013-11-29 3 min read bash Linux Uncategorized Wordpress
Just copy this script to your web-server cgi-bin directory and enjoy. The script with show the common errors like 404 Error, Internal Server Error and others. It will show the User agent distribution using simple commands like grep, uniq, awk and so on. You would need to change the tfile – which is temporary file and also the access.log path in the next line. Just re-direct the output to some file with html extenstion. Continue reading

phpmyadmin access problem and change server from URL

2012-09-30 1 min read Database Fedora
I was having issues with one of the phpmyadmin setups. The first server defined in the config file was not accessible and the theme that I was using was not allowing me to change the server from the first page. This resulted in a state where I was not able to access phpmyadmin in any way. I could not connect to any of the servers. And thus had to hack my way in to phpmyadmin to find out how to connect to other servers from URL. Continue reading

xmlwf – Is your xml document well formed?

2012-02-18 1 min read bash
There is a small nifty utility called xmlwf that can check your xml documents to see if they are well formed. sudo yum install expat Once installed, simply use : xmlwf Need more details, just check the man page 🙂 Related articles Assigning ID to Objects transmitted in XML document (stackoverflow.com) removing characters from php output in xml (stackoverflow.com) C# XML parsing using XElement and child contents (stackoverflow.com)

Fast and bleeding edge Firefox.. version 7

2011-06-30 2 min read Firefox
Firefox 7.0 nightly builds have started and it seems to be quite fast. So, if you dont care about some sites not opening or once in a while your browser crashing, been using for 2 days on Windows , has not crashed so far and worked on all sites so far :), then you should install the Nightly build. Head over to the nightly build site and install the appropriate build for your OS. Continue reading

faster bash operations on files with File Descriptors.

2011-06-11 2 min read bash Learning Linux
I was writing a bash script that would do some operations and read and write to file. Seems that that was pretty simple with 1 2 3 4 5 <td> <div class="text codecolorer"> while read line<br /> <br /> do<br /> <br /> done<file </div> </td> </tr> and then use redirection operations like “>” and “»” to write to file. Done with the script pretty fast. So far so good, when I went for real life tests, no one was interested in using it, why? Continue reading

analyze debug queries output for wordpress

2011-02-09 2 min read Wordpress
Some time back, my website became too slow and I started getting timeout response for quite a lot of my pages. When I analyzed things, I found the issue was with the DB queries taking a lot of time. So, I thought of getting my hands dirty and started with installing the plugin “Debug Queries”. Just in case, you don’t know about the plugin, it lists all the queries to DB along with the time taken for the query when a Admin user visits any page. Continue reading

cURL – Tutorial

2010-09-15 1 min read bash Fedora Linux
Here are linkw to two nice tutorials on curl and how to use curl to login before we try to fetch a page. Hope you find them useful. http://curl.haxx.se/docs/httpscripting.html http://www.youtube.com/watch?v=XcgQUsorF_8 http://scriptasy.com/php_11/tutorial-curl-login_44.html Related articles by Zemanta {."zemanta-related-title"} How To Display Just The HTTP Response Code In CLI Curl (beerpla.net)
Older posts