How To

  • how not to round your floats…

    Just so I never foget… observe the following test cases – $foo = 8.37*40*0.175*100; echo $foo.' == '.(int)$foo; > 5859 == 5858 $foo = 8.37*40*0.175*100; echo $foo.' == '.round($foo); > 5859 == 5859 I believe that casing to INT will round towards zero as documented in the php docs, I also believe the 5858 number [...]
    feat_generalcoding
  • How to Turn Off ModSecurity for a Site

    This was copied from – here, I've posted this here for referance… Question: My dedicated server is running ModSecurity, but one of the websites needs it turned off in order to operate correctly. How do I turn it off for just one site? Answer: Before you proceed, keep in mind the reason you have ModSecurity [...]
    modsecurity
  • PDF postscript conversion

    Want to convert your postscript level 3 PDF documents to postscript level 2? Why would I want to do this? At the time of writting, some PDF conversion software cannot read PDF documents correctly when encoded as postscript level 3. The solution to this is to save them as level 2. Two notable examples of [...]
    feat_pdf
  • info Zip shell usage

    Just a quick note on the switches for zip, to zip a directory its – zip -r zipname foldername Threw me this morning as the args come before the zip name…
    feat_othersoftware
  • phpmailer reply-to fix

    Do you run a mail list with phpmailer and want to enable a reply-to path on your email messages while leaving the from address tagged to a bounce handeling email box? Heres how we cracked it.. Modification to PHPlist, version 2.10.2 open config/config.php and add to the end: <php/><br /> # START web engineer mod<br [...]
    feat_php
  • swfEmbed 0.9

    Overview This plugin makes it quick and simple to insert flash movies into your worpress posts using a UBB style tag. The syntax to insert a movie is as follows [swf]src,width,height,ver,bgcol,alt[/swf] swf the address of your flash movie width the width of your movie – either the number of pixels or a percentage height the [...]
    feat_wordpress