notapattern.net: code samples
code that was written for use on !aP. feel free to adopt/adapt for your own use.
* css: !aP's main style sheet: style.css
* php: print the last time the file was modified:
     last modified: <? echo date("m.d.Y H:i:s (T)", getlastmod()); ?>
* php: print the server uptime, removing the load averages and # of users:
     <?
       $test = exec("uptime | awk '{print $4;}'");
       if($test == "days,")
         $uptime = exec("uptime |sed -e 's/,/ /g' |awk '{print $3 \" days, \" $5;}'");
       else
         $uptime = exec("uptime |sed -e 's/,/ /g' |awk '{print $3 \" \" $4;}'");

       echo('server uptime: '.$uptime);
     ?>
* php: time the execution of a code fragment:
     <?
       $t0 = array_sum(explode(' ',microtime()));
       /* code to be timed goes here */
       echo('time: ' . round((array_sum(explode(' ',microtime())) - $t0),4).' sec');
     ?>