Counting Messages in IMAP Folders in Python

Continuing on my last post (), I wanted to show a snippet of Python code that will list a set of IMAP folders and count the number of messages in them. You give it a starting folder and it lists that folder plus all/any sub-folders and their message counts. At the very end it prints …

Read moreCounting Messages in IMAP Folders in Python

Listing IMAP Mailboxes with Python

I’ve been working on some Python scripts recently to manage my IMAP mailboxes and the information I found on the internet was fairly good, but lacked a completeness that my newbie Python skills required. So, I figured I’d post a complete example to list mailboxes (folders) for your IMAP account. This was developed using Python …

Read moreListing IMAP Mailboxes with Python

Hey Microsoft, Where Are My Keyboard Shortcuts!?

I recently upgraded to Microsoft Office 2010. I really like the way the design team is going on their newer versions. It is really sleek and nice feeling, but I’ve noticed something missing… my keyboard shortcuts! I’m a Linux guy at heart (I install cygwin on every Windows machine I own and/or use) so performing …

Read moreHey Microsoft, Where Are My Keyboard Shortcuts!?

Hackety-Hack, Don’t Come Back

Well, this has been a first for me. I was recently hacked on this very blog; or at least it was brought to my attention recently. I suppose it could have taken place a while ago. My hosting provider started sending me notices that my webspace account was generating large amounts of spam mail while …

Read moreHackety-Hack, Don’t Come Back

Windows Vista crcdisk.sys – System Won’t Boot

I recently had a friend call me in need of computer repair assistance. I’ll save you the many hours of troubleshooting and simply list the fix here.

The Dreaded crcdisk.sys

I found this symptom of the problem by booting into Safe Mode and watching the drivers load. I noticed that it always hung for a long time on the crcdisk.sys file. Well, if you perform a search on Google for “windows vista crcdisk.sys” you will find a plethora of woes from computer users desperately trying to regain the functionality of their PC. There are also a plethora of fixes, advice and this worked for me posts. I tried many of these to no avail.

The Road To Recovery

The laptop I was working on was a Toshiba laptop and it had a system restore disk. Great! Sort of. Restoring the system to factory condition from the disk (after the owner had backed up their data of course) resulted in a system that was broken and still had the problem listed above. Hmmm.

Another operating system perhaps? I installed Windows XP from scratch. Worked great. I installed Windows Vista SP2 from scratch (another disk). Worked great. Re-tried the system restore from Toshiba. No good.

At this point I figured I was just going to install Vista from scratch. So I reinstalled Vista and downloaded the Toshiba drivers from their website. One by one I started installing the drivers. Until I got to the driver for a flash media card reader (front of laptop). Bam! It froze up during the install. So I rolled that change back using Windows System Restore and then continued with all of the other drivers. No problems. I tried the flash media driver one more time just to be sure, and sure enough it failed again. That’s good! Predictability is key in diagnosing computer problems.

Read moreWindows Vista crcdisk.sys – System Won’t Boot

Dump A MySQL Database To YAML Using PHP

The Problem

I was recently working on a project that is built on WordPress / BuddyPress. I built up some content using the CMS features of WordPress in my development server and then I transfered the WordPress content to a beta server using the export/import functionality. That kind of stinks having to do that every time I want to push updates to my beta server. So I looked into using Doctrine to generate data fixtures which I could repeatedly run against the different database. Doctrine supports YAML files, which are extremely easy to edit by hand, so it seemed like a good idea.

So what’s the problem? Well, I didn’t currently have any of my data in YAML files. I didn’t want to had edit them or do some sort of copy and paste madness. So, I wrote a script in PHP to dump my data into a YAML file.

Read moreDump A MySQL Database To YAML Using PHP