Archive for the ‘Uncategorized’ Category
Post-Increment Variable Bug
Found this little bug today in some old (untested code). I was amused that the code would have worked using pre-increment operator (and yet, still been wrong). # Simplified example, in the original code this was 3 lines long # Assume use_record_map = false; record_id = (use_record_map) ? lookup_record_id(foo) : record_id++; Pythons lack of ++ [...]
hacked
Yep, I was hacked 5 days ago. Seems I’ve been part of some DOS attack (I forgot to record the IPs of who, and it was only ~60GB of traffic). From what I can tell, it exploited an (old, now patched) hole in PHPMyAdmin that let you write PHP files with what ever content you [...]
3.2 Rolling FoL SS HoTs
Holy Paladin changes in 3.2 seem pretty significant, I’m currently hoping the FoL/HoT mechanic works a little like ignite, where in effect you have n number of buffs up on the target, and WoW just consolidates them into one (As oppose to old ignite rolling, where each time the debuff was added, the damage was [...]
I before E except after C…
I before E (yuccamuffin.com) <?php $words = file(’/usr/share/dict/words’); $words = array_map(’trim’, $words); // Ignore words with any punctuation $words = array_filter($words, ‘ctype_alpha’); foreach($words as $word) { // ignore proper nouns (they start with an uppercase [...]
obsessed with anonymous functions
Any normal person would just live without anonymous functions in PHP, they are buggy and non trivial ones are pain to write and read. I’m not sure why I seam to obsess over them. At the very least, the below code will test unicode in your dev tools Edit: Of course after I wrote that [...]
