How to Create a Word to PDF Converter Script in Powershell

This is a little Powershell script that I came up with to convert a folder full of Word documents into PDF files. It takes a single command-line parameter, which is the directory containing the files that you wish to convert. It puts the PDF files in the same directory alongside the originals.

Read moreHow to Create a Word to PDF Converter Script in Powershell

How To: Create a NetBeans Startup Project

As a user of the NetBeans IDE, I have always had this one complaint. NetBeans has what they call Project Groups. These are used to group projects that should be worked on at the same time, similar to a Solution in Visual Studio. You can define multiple Project Groups and switch between them. Great, right? What’s the problem?

The problem lies in the fact that NetBeans will always open the last Project Group that you had open when it starts up. Some of the projects that I work on are quite large, with Maven repositories that must be scanned and re-indexed upon startup. That’s all fine and good if that is the project I am working on, but if it isn’t then it becomes a big headache. Then I must cancel the operations and try to convince my machine that I really don’t want to go through all of that scanning and indexing… I just want to open up a much smaller project or even create a new one.

My solution: Create a Startup Project Group and have NetBeans always open that when starting. Here’s how to do it.

Read moreHow To: Create a NetBeans Startup Project

How To: Get Average of Variable Range in Excel

Computer Image

Have you ever needed to get an average of a group of numbers in an Excel spreadsheet? And have you ever needed to do so with a range that is variable? In other words, “I need to get an average of Column B, but I don’t know upfront how many rows are going to be in Column B.”

Well, it turns out to be fairly simple in Excel. I’m partly sharing this with the world to be a help to others, but also because I forget things… and I needed a place to keep it!

Read moreHow To: Get Average of Variable Range in Excel

My Entire Ebook Library Online

Oh… you didn’t think that title meant I was providing my entire ebook library to the public, did you? Sorry. Thar be no pirates here, maties. This is more of a tutorial on how I make my ebook library available to me. Onward, hoe!

I love using Calibre to maintain my ebook collection. If you have not heard of it and would like more control over your ebooks, then you should take a look. Calibre also has a built in server that you can access via a web browser. This allows you to browse your ebook collection and download them if you like. This is a really neat feature, except that the software has to be running in order to access it.

What I really want is to be able to publish this library and be able to access it from anywhere without any dependence on my computer and the Calibre software running.

This is my solution.

Read moreMy Entire Ebook Library Online

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

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

Modify PHP CLI Include Path Dynamically

I was working with an application platform that I had just downloaded today. I just wanted to check it out and play with it a bit. In the application framework was an executable script that provided some command line utility. I fired up the script and received an error like “PHP Fatal error: require_once(): Failed opening required…”. Of course non of the files from the downloaded archived were in the include path for my system, but I didn’t want to just go adding it to my php.ini file just to play around with it short term. What to do.

Command Line Options

First I wanted to see if there was a command line option that I could pass to PHP to tell it what include_path to use for just this one execution. If you execute the following you’ll see the usage:
php --help
There is no include_path command line option, but there is the -d foo[=bar] option which allows us to modify any of the INI entries by key/value.

Read moreModify PHP CLI Include Path Dynamically

Building ChromiumOS (The Google OS)

I’ve been watching all of the hype about downloading and running the latest Google creation, ChromiumOS this week so yesterday I decided to take a stab at it myself. I did not however want to simply grab a VMWare image and run it. I’m a software engineer for Pete’s sake! I should build it myself. …

Read moreBuilding ChromiumOS (The Google OS)