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 [...]
I wrote a simple Konami Code class for actionscript. Create an instance, pass the current stage, add an Event listener and do whatever you want! var konami:KonamiCode = new KonamiCode(this.stage); konami.addEventListener(KonamiCode.KONAMI,onKonami); function onKonami(e:Event) { trace('WOO, 30 LIVES!'); } the default sequence is up,up,down,down,left,right,left,right,b,a and it waits 1 second per keypress before the user has [...]
Recently I needed to be able to control the Vimeo player on a site I was making. While Vimeo makes their best effort to showcase the API I had to dig a bit to figure out how to simply tell the player to play. So here’s a quick step by step to using the Vimeo [...]
Whether you want more privacy or want links you click on facebook to load a bit faster, this script stops facebook from bouncing you through its redirect script when you click an external link.
Aug 11 added feedback form Aug 4 Changed Property tax to 3% ($67.8 million) added KPMG efficiencies (projected $380 million) under executive category as from this article
This adds Google Reader style keyboard navigation to any blog or site running on wordpress, tumblr or any other system that uses ‘post’ as the class for posts in a post listing like the home page, category page or archive page. press J to skip to the next post, press K to skip to the [...]
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 [...]