deekayen's blog
Wasp sting to the eye thwarted
I have myopia and astigmatism, so I wear glasses. I could probably get eye surgery, but when I was mowing the lawn today, a wasp took a dive at my eye. Luckily, all it did was bounce off my glasses lens and fly away, but I shudder at the thought of a wasp sting to the eyeball.
President Ham Sandwich
I was talking about Bob Barr for president 2008 and one of my coworkers made some good points about how he's just an old-school Republican in Libertarian disguise. When I asked who I could vote for instead, he asked if he could write-in Ham Sandwich. The coworker on the opposite side of me said he'd like to vote for a poodle. That inevitably led to the question, how long before Vice President Poodle ate President Ham Sandwich?
Now with apparel as a t-shirt, organic t-shirt, and stein.
Zend Studio for Eclipse Drupal formatter
For years I've been a paying customer of Zend, using their Zend Studio Professional. They discontinued production of their custom Java version and opted to switch to making plugins for Eclipse.
I'm just now switching from the old Zend to the new one and discovered a formatter to handle all the code spacing automatically. Naturally, since I do most of my work with Drupal, I made a custom formatter file to follow coding standards for 4.7.x to 6.x. There have been some standards changes to take effect for D7, and I'm not coding for that yet, so this should be a good file for a general audience.
In your Zend for Eclipse or PDT install, go to the preferences, PHP section, Formatter and Import... the attached XML file.
Don't forget to also run your code through the coder module, which will not only check your coding style, but look for upgrades, database injections, and some other cool things.
Learning DVORAK
I'm very slowly learning the DVORAK keyboard layout. In a rare occasion for me to actually purchase software, I have copies of Ten Thumbs and Master Key. They're both great programs each with their own strengths and they were good starts for introducing me to the home row. While I could have practiced by blogging, last night I used reCAPTCHA as my word list for practice. Their learn more page has a demo box you can use to submit OCR strings. Learning to type all over again is frustrating to say the least, but I'm convinced it's worth it.
If you have a Mac, and want to convert to DVORAK, grab the top two corners of your keys and pull forward. There's a lip on the bottom of the key holding that part on. Just be sure you grab the tippy tip of the corners because otherwise you'll also grab the white clips that hold on to the body of the keyboard and those are a pain to put back together.
Automate unchecking checkboxes
I'm doing some testing of an upgrade for a site from Drupal 4.7.x to 5.x. As part of the major version upgrades in Drupal, you're supposed to disable all the modules you have installed. Since I got tired of unchecking boxes, I used the Greasemonkey addon for Firefox 2 to do it for me.
Once the addon is installed, right click on the monkey face in your status bar and make a new user script.
name: Uncheck Boxes namespace: uncheck_boxes description: Unchecks all checkboxes that are enabled by default include: http://yourtestlocation/admin/modules
When you hit ok, your default text editor will ask you for script content.
// ==UserScript==
// @name Uncheck Boxes
// @namespace uncheck_boxes
// @description Unchecks all checkboxes enabled by default
// @include http://davidnorman.local/test25/admin/modules
// ==/UserScript==
var chkboxes=document.getElementsByTagName('input')
for (var i=0; i < chkboxes.length; i++) {
if (chkboxes[i].type=="checkbox") {
chkboxes[i].checked=false
}
}That's it! Reload your modules page and all the checkboxes should be unchecked by default. When you're done disabling, you can right click the monkey face and uncheck your Uncheck Boxes script, disable Greasemonkey, or leave it available for other sites you want to uncheck by default.

