Category Archives: Web Development

Implement Selenium tests

Installing Selenium 1.0 and write tests with PHP _ The documentation is very good: http://seleniumhq.org/docs/ _ Donwload Selenium RC from here: http://seleniumhq.org/download/ _ When you extract it, there will be a directory with the server and a number of directories … Continue reading

Posted in PHP, Web Development | Leave a comment

CSS selectors optimisation

From the last chapter of “Even faster websites”. CSS selectors are matched right to left (!). That means the rightmost selector should be as less broad as possible: you should avoid * and tags as rightmost selectors. The quickest selectors … Continue reading

Posted in HTML / CSS | Leave a comment

Process forking in PHP on Linux

Command Line with PHP _ Introduced with PHP 4.3 (2002-12-27) _ PHP packed with very useful functions: exec, shell_exec, passthru _ PEAR package Console_CommandLine to easily handle arguments and options _ You can do system administration and release management with … Continue reading

Posted in PHP, System Administration | Leave a comment

How to benchmark apache+php

This is to see whether you server is CPU-bound or RAM-bound. We have to stress it and see which one of those components gets saturated first. If that is the RAM, we can add easily more RAM. The amount of … Continue reading

Posted in Apache, PHP, System Administration | Leave a comment

How to make a transparent background/selection on an image using GIMP

http://geekswithblogs.net/TimH/archive/2006/03/20/72797.aspx

Posted in Web Design | Leave a comment

PHP Conference – London 2010 – Summary

Free notes from the PHP London Conference 2010  - http://www.phpconference.co.uk Lost art of Simplicity by Josh Holmes (working in Microsoft)   –  http://www.slideshare.net/joshholmes/the-lost-art-of-simplicity – http://www.joshholmes.com/blog/2009/04/29/TheLostArtOfSimplicity.aspx _ NIH (not invented here) syndrome   -  people want to develop everything internally _ The … Continue reading

Posted in PHP | Leave a comment

PHP – Plurilize

This is a very good post: http://kuwamoto.org/2007/12/17/improved-pluralizing-in-php-actionscript-and-ror/ We have test it in the office and it works great!

Posted in PHP | Leave a comment

PHP function to get the most recurrent words in a file – it uses Linux command line

/** * Extracts the most recurrent one-word and two-word terms in a file * Filters out some common stop words and you can also pass extra ones * * @param string $filepath * @param int $minWordLength – the minimal word … Continue reading

Posted in Linux Command Line, PHP | Leave a comment

PHP – Nice Debug Trace

<?php echo parse_backtrace(debug_backtrace()); function parse_backtrace($raw){ $output=”"; foreach($raw as $entry){ $output.=”\nFile: “.$entry['file'].” (Line: “.$entry['line'].”)\n”; $output.=”Function: “.$entry['function'].”\n”; $output.=”Args: “.implode(“, “, $entry['args']).”\n”; } return $output; } ?>

Posted in PHP | Leave a comment

CSS Sprite Online Generator

http://spritegen.website-performance.org/ You can’t include animated gifs in the sprite (otherwise they will be still). You can’t include list bullets because if the list item is quiet long, the images under the bullet point icon in the sprite will be shown.

Posted in Web Design | Leave a comment