PHP

Don’t use imagecreatefromstring

If you’re looking to create a jpg file from raw image data, like from an email attachment, don’t use imagecreatefromstring(); because it strips almost all the header data including a ton of exif info off the file. Simply do this $filename = 'pic.jpg'; $r = fopen($filename,'x'); fwrite($r,$raw_data); //$raw_data is the data string of the image [...]

CSS Combine

This simple little php script (less than 50 lines!) takes a list of your css files that you use on every page of your design, combines them and minifies them. This accomplishes 2 things: it cuts your http requests for css files to 1 and it cuts the size of the request considerably. I made [...]