As proof that sometimes randomly browsing the web while procrastinating from boring work (Saturday night year-end accounting and tax organizing, for instance) can sometimes be useful, a web trick:

Flickr engineer “schill” found out that in order to natively re-size images on the client side without making them look like 8-bit dog vomit in MSIE7, you can assign CSS property “-ms-interpolation-mode: bicubic;“. For MSIE6 you can use the good ol’ AlphaImageLoader filter (however he doesn’t mention this might kill your ability to use z-index, a minor detail which will no doubt drive someone batty nonetheless)

In good browsers the rendered image quality ranges from OK to pretty-good, without doing anything. So in those (rare) cases where “OK” is Good Enough ™, this will be a huge benefit to mankind.

The thumbnail here is 265×241 natively, but has these tricks applied to be 50×50, and they make a huge difference. And also, it is hilarious.

The proper CLI incantation to get mplayer/mencoder to clockwise rotate, apply an autolevels filter and re-sample an AVI video is:

mencoder dscf5432.avi -vf rotate=1,pp=al -ovc xvid -xvidencopts pass=1:bitrate=687 -oac copy -o out.avi

Some things this week:

Why’s Camping for quickie site

Git creative at github for quickie versioning

duplicity for quickie encrypted backups to S3

stackoverflow for quickie answers

Media Plugin for quickie embedding

hadoop for quickie figure-outing.

besides the official documentation, some must-read overviews of the issues with PHP’s session support are provided by Harry and segfaultlabs.

Installation of mod_security from source is very easy, but did not quite go according to the published documentation on CentOS 5. Following is a brief detail on steps required.

Read the rest of this post »

At long last I’ve decided to use the latest and greatest PDO in a new app, switching from good old PEAR MDB2/DB for all database access. This is supposed to give you added speed, uniformity and a consistent standard to use throughout PHP-land. But the infatuation was short-lived.
Read the rest of this post »