Feb 052014
 

I accidentally changed some configuration of a VM and it refused to start after reboot, I know I can simply revert what I changed to make it works again so to avoid recovery process, and I found this great article which described exactly what I want. I’m going to repeat the steps here as I also need to write steps to unmount. Note that you need to have kpartx installed. Continue reading »

Jun 242009
 

I have about 2,600 photos uploaded to one of my web sites, and I compose couple of quick PHP scripts to help me browse them. There is a img.php to resize the photo for different purpose (such as thumb view for listing page, medium size for view online, and full size for downloading), but whenever I try to download the photo, I found it’s tough as it always prompt to save as “img.php.jpeg”.

So, instead of doing any PHP stuff, I changed .htaccess under the folder, let apache do rewrite for me, in couple of minutes everything works like a chime.

These are really simple tasks, I guess it can be done with anything else (lighttpd, python, blar blar), but obviously I’m still familiar with PHP and Apache httpd, guess I should stick on that till something else can be this easy to me, just as years back I switched from qmail to postfix …