Archive for September, 2007

Random code: Comic Calander

I wrote this the other night in response to a question on the OCAU forums, and though that perhaps someone else might benefit from it (though please take note of the below disclaimer). The script is a really basic image archive (in this case comics), showing (and linking) the when images were created (based upon [...]

Posted by Matthew on September 25th, 2007

Filed under php, programming | No Comments »

Bad code I’m proud of

Some days I feel like I’m fighting with PHP every step (I’m sure most PHP programmers know what I mean). To stop it getting to me, I often try to come up creative ways to implement some code (often hacked up and unreadable) just to prove that I’m better than it is. The code below [...]

Posted by Matthew on September 21st, 2007

Filed under php, programming | No Comments »

Better anonymous functions in PHP5

I’m sure everyone knows that create_function is evil, while at the same time, so very appealing. The most significant problem are the memory leaks that occur every time `create_function()` is called (as it’s not really an anonymous function, just a randomly named function in the global scope). The below class sidesteps the problem by caching [...]

Posted by Matthew on September 17th, 2007

Filed under php, programming | No Comments »

WoW

Progress Hmm, seems the the numbers I was reporting weren’t actually that useful thanks to arcane talents. After a respec back to a more conventional fire spec, I now have: +632 spell damage, +172 fire damage, and +26 more from set bonus. Giving a total (before talents) of: +830 fire damage, again, it all came [...]

Posted by Matthew on September 16th, 2007

Filed under games | No Comments »

Fun with relative dates

$ date Fri Sep 14 12:48:47 EST 2007 $ php -r "echo date(‘Y-m-d H:i:s’, strtotime(‘Friday’));" 2007-09-14 00:00:00 $ php -r "echo date(‘Y-m-d H:i:s’, strtotime(‘next Friday’));" 2007-09-21 00:00:00 $ date -d "Friday" Fri Sep 14 00:00:00 EST 2007 $ date -d "next Friday" Fri Sep 14 00:00:00 EST 2007 My first thought was that PHP was [...]

Posted by Matthew on September 14th, 2007

Filed under linux, php, programming | No Comments »

Yet more wow

Progress +834 Fire (+845 With Arcane Intellect) with one Metagem slot to fill and without Major Spellpower on my weapon. Though, it did cost a bit of Int and Stam. Enchant Enchant Weapon – Major Spellpower on my Greatsword of Horrid Dreams Actually start running Karazhan Craft Spellfire Robe to finish the Wrath of Spellfire [...]

Posted by Matthew on September 9th, 2007

Filed under Uncategorized | No Comments »