phpmyadmin access problem and change server from URL

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. And here is my finding:

http://server/phpmyadmin/index.php?server=1

In the above, replace server with your server address/IP. and also the number in the end with the server index in you phpmyadmin config file.

Enhanced by Zemanta

convert word document to html

First install the required package:

sudo yum install wv

Description:

Description : Wv is a program that understands the Microsoft Word 6/7/8/9
: binary file format and is able to convert Word
: documents into HTML, which can then be read with a browser.

And here is the list of the programs that this utility provides:

/usr/bin/wvAbw
/usr/bin/wvCleanLatex
/usr/bin/wvConvert
/usr/bin/wvDVI
/usr/bin/wvDocBook
/usr/bin/wvHtml
/usr/bin/wvLatex
/usr/bin/wvMime
/usr/bin/wvPDF
/usr/bin/wvPS
/usr/bin/wvRTF
/usr/bin/wvSummary
/usr/bin/wvText
/usr/bin/wvVersion
/usr/bin/wvWare
/usr/bin/wvWml

So, if you want to convert a doc file to html just do:

wvHtml file.doc file.html
Enhanced by Zemanta

g flag in :s useless in vim

Some time back there was a post on vim_use list about the “/g” flag for the search and replace functionality of the vim. And the response of “Tim Chase” on the same was very elaborate and interesting. I always knew that “/g” is only for replacing multiple occurrences on the same line, but here are few things that I did not know.

   :0/this/s//that

This one will only replace the first occurrence of this in the whole file.

   :-/this/s//that

This one will replace the first occurrence of this in the file from current cursor position including the current line.

And finally here is the link to the post.

Enhanced by Zemanta