Blog / Howto

Python function for displaying a list of dictionaries in table format

December 3, 2010

I just spent like 2 hours writing this function, but it was worth it!

This cut down a lot of duplicate code on the project I'm working on. I figured I'd post it here in case someone is trying to do the same thing. I'm sure my code is not optimal so if you have any suggestions on how to improve it please feel free to comment :).

from operator import itemgetter

def format_as_table(data,
                    keys, …

How to automate Microsoft Office 2007 installation

March 11, 2009

I was just updating some documentation on our wiki and found some old notes on automating Office 2007 installation. We upgraded our Microsoft Office software early last year from Office 2003 (and a few Office XP) to Office 2007 and this simple installation script saved us a lot of time. Here are the steps:

Step 1. Copy the contents of the Office 2007 installation CD (or package) to a network share (eg. \\server\Office12).

Step …

How to query Active Directory using SQL Server

August 25, 2008

Here is one of those things that I wish I had known much sooner. Very useful and a big time saver. I just found out about this a few months ago when I wanted to run a report against AD to see if the account info are consistent and up to date, to see which accounts have passwords set to never expire, when they were created/last updated, etc.

So I asked myself whether it’s possible …

How to enable Remote Desktop remotely

February 18, 2008

I had to do this just a few minutes ago and I figured I should probably post it here.

  1. Open Registry Editor by going to Start -> Run and typing in regedit.
  2. Go to File -> Connect Network Registry… and type in the name of the computer where you want Remote Desktop enabled. Click OK.
  3. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server of that computer.
  4. Double-click the DWORD called fDenyTSConnections and set its value to 0. …
Newer