July 13th, 2009
I’m a huge fan of AutoHotKey. AutoHotKey has the power to make your keyboard do amazing things. I use it on a daily basis to open programs and folders, manage windows, and edit text amongst many, many other things. I use it so extensively that I find it frustrating to use a computer without it. AutoHotKey has the power to transform you into a computer ninja. I highly recommend its use.
Recently I released a part of my AutoHotKey script to the Internets and called it Kommand. Kommand remaps your keyboard and enables VIM-like key bindings that are useful for scooting around a document and making changes. I’ve found it very useful for coding. The nice thing is that since it is an AutoHotKey script, it is application independent and works wherever text input is needed. In addition to text editing, Kommand provides many keyboard shortcuts that help in window management. You can close, restore, maximize, minimize, and move windows around the screen really easily and quickly.
Kommand is very early software and I am only putting it out there to see if anyone is interested. More information about it can be found in the AutoHotKey forums here:
http://www.autohotkey.com/forum/viewtopic.php?p=281279
Kommand can be downloaded from the following link. The source AutoHotKey script is included along with a few files and executables that are useful for integrating it with Windows. If you use it, please let me know what you think!
http://www.kylirhorton.com/kommand.zip
Tags: AutoHotKey, Vi
Posted in Programming | 15 Comments »
May 12th, 2009
If you are running a beta or release candidate of Windows 7 or if you’ve turned test signing on (like me) and you would like to remove the annoying watermark from the corner of your desktop, downloaded and run the following small executable. I’ve used it without any problems on Windows 7 64-bit RC (Build 7100) and the retail version of Windows 7 64-bit (Build 7600). It works like a charm and my machines no longer have the ugly “Evaluation Copy” or “Testing Mode” text sitting in the bottom corner of my desktop.
http://www.askvg.com/how-to-remove-windows-7-rc-watermark-build-info-from-desktop/
Tags: Windows 7
Posted in Windows | 3 Comments »
April 6th, 2009
I’m a Gentoo newbie. Actually, I consider myself a newbie to Linux in general. The other day while putting together my own system using Gentoo, I ran into problems every time I tried to emerge something. While portage was calculating dependencies, it would suddenly stop and spit out a cryptic error trace that ended with:
cPickle.PicklingError: Can't pickle <type 'method-wrapper'>: attribute lookup __builtin__.method-wrapper failed
None of my Gentoo geek buddies knew what was up. After trying a few things, I came up with a good solution: manually reinstall emerge/portage. I found an excellent tutorial on how to do this at gentoo.org:
http://www.gentoo.org/proj/en/portage/doc/manually-fixing-portage.xml
Tags: Linux
Posted in Programming | No Comments »
February 23rd, 2009

Vista got a lot of things right. It also got a few things wrong. The naggy UAC “are you sure you want to do this” prompts is one example. Another annoyance is the sudden dialog that interrupts what you’re doing to tell you that less than 25% of your RAM is free. This warning would probably be warranted and helpful on systems with a small amount of RAM, but on mine 25% free memory is hardly anything to worry about – it means I have at least 1 GB of memory left.


Fortunately, like most things, there’s a fix.
- Open the registry editor. (Click the Windows orb, type “regedit”, and hit enter.)
- Browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WDI\DiagnosticModules\.
- Export the following folders. This is your backup in case something goes wrong.
{5EE64AFB-398D-4edb-AF71-3B830219ABF7}
{45DE1EA9-10BC-4f96-9B21-4B6B83DBF476}
{C0F51D84-11B9-4e74-B083-99F11BA2DB0A}
- Take ownership of the each folder mentioned in step 3. (You can take ownership by right clicking the folder and then hitting permissions. Click the advanced button and change owner to your user. Click OK and then give full control to your user group. Hit OK again.)
- Delete the folders from step 3.
- Reboot and enjoy.
Update: After doing the above steps, you should know that once memory runs out, it is out. You will have no warning. Once your memory gets maxed out, programs will behave very erratic and suddenly crash without warning. I’ve decided that this side effect can be just as annoying as the popups. If you consistently push your machine’s memory to its limits, you should think twice about disabling the low memory messages. Having said that, I still prefer using my machine without Vista’s nagginess.
Tags: Registry
Posted in Windows | 11 Comments »
February 20th, 2009

I began having problems with the Axialis icon editing toolbar in Visual Studio a few weeks ago. It would appear as a short, empty, ugly little toolbar within Visual Studio. I would remove it, even delete it out of Visual Studio, and it still hung around and appeared there every time I started up. Fortunately for me, this problem has a simple fix.
If you’re using a x86 machine, edit the following within the registry:
Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\AddIns\IconWorkshopAddin.Connect
Set value CommandPreload to 0×00000000 (0).
If you’re using a x64 machine, edit the following within the registry:
Key: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0\AddIns\IconWorkshopAddin.Connect
Set value CommandPreload to 0×00000000 (0).
References:
http://www.axialis.com/forum/viewtopic.php?f=4&t=2179
Tags: Visual Studio
Posted in Programming | 4 Comments »
September 9th, 2008
Today I’ve been working on creating a simple WPF application. As a part of this application, I want to store some user-defined preferences. This post briefly details how I went about doing this using C# and Visual Studio 2008.
First, make sure your application has an App.config file. If it is missing, add it by going to Project > Add New Item… and then selecting “Application Configuration File” from the pop up. Visual Studio will then add a blank App.config file to your application. Open it and make it look something like this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="PreferenceToRemember" value="DefaultValue" />
</appSettings>
</configuration>
In order to write to this App.config file, you will need to add System.Configuration as a project reference. And of course you’ll need to have the appropriate usings statements on the right forms. Once all that is done, you can write to the App.config file with the following:
Configuration oConfig = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
oConfig.AppSettings.Settings["PreferenceToRemember"].Value = "NewValue";
oConfig.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("appSettings");
The last line in the code above refreshes the current in-memory configuration with what is saved inside the App.config file. To read from the App.config file, just use this:
string strPreferenceToRemember = ConfigurationManager.AppSettings["LastProject"];
As a final note, I noticed that nothing seemed to be written to the configuration file while debugging within Visual Studio, but once I published the application it worked as expected. I don’t know why this happens, but I’ll modify this post if I find out.
Tags: C#, WPF
Posted in Programming | 1 Comment »
July 26th, 2008
We (Mindy, Bryana, and myself) went on a 5 day road trip to Montana. For the most part we stuck to scenic back roads and took the long and lazy route. Along the way we stopped at the Tetons, Beaverhead National Forest, Flathead Lake, Glacier National Park, and a quick dip into Alberta. We of course didn’t spend nearly enough time in any one location, so now I’m itching to go back and explore—especially Glacier National Park.
The trip was to celebrate Bryana’s graduation, birthday, and to give her a chance to see her old friend Cody. Cody is a mustang that Bryana took care of for three years. I hear he’s got quite the attitude and a set of bad habits to match, kind of like Rook (our dog).
Aside from the beautiful scenery and the general good times, one interesting event occured. On the trip back home we decided to hit I-15 and get back as fast as we could. While traveling through Montana, I passed an RV going 20 mph over the speed limit—which means I was at 90. And of course, I got pulled over. The police officer recognized that I was passing and so he kindly reduced the ticket to just 10 mph over. He then said, “Now you can either appear in court on this date… or you can pay your fine right now. It is $20.” That flabbergasted me. I dug around the car and eventually Bryana spotted me the cash. I then ponied up and paid my ticket right then and there. Honestly I felt like I was paying off the cop, not the fine. And who knows, maybe he enjoyed a good lunch because of me.
Anyway, the trip was great. I’ve attached some of the photos that we took along with a map of where we drove. Enjoy!
Read the rest of this entry »
Tags: Road Trip
Posted in Photography | No Comments »
July 2nd, 2008
As a followup to my previous post, here’s a useful regular expression for selecting a valid CSS length.
Read the rest of this entry »
Tags: CSS, Regular Expressions
Posted in Programming | No Comments »
February 28th, 2008
Recently I needed to have a Regular Expression which would match valid CSS colors. I wasn’t able to find any after searching the Internets for a while, so I wrote my own.
Read the rest of this entry »
Tags: CSS, Regular Expressions
Posted in Programming | 2 Comments »
January 10th, 2008
Looping through an associative array in JavaScript is straight forward, but it does have some catches. You will want to use a for (...in...) loop. This will iterate through every index in the array and even the properties of the array. In order to loop through only the elements within the array, you’ll want to do something similar to this:
for (var name in associativeArray) {
if (name != "length") {
// Code that interacts with associativeArray[name]
// name will contain the index for each property
}
}
The above code snippet can also be useful for iterating through the properties within an object. Firefox supports iterating through an array using the each keyword like so:
for each (var object in associativeArray) {
// object now contains the actual item and can be directly used.
}
In this case, you do not need to worry about picking up the length property.
Tags: Firefox, JavaScript
Posted in Programming | No Comments »