Andrew Guyton's Blog

I particularly like this image, which is surprisingly enough, a panorama taken with my Canon Powershot IS1000. Click through to the flickr page where you can get a high-res version.


IMG_5044_IMG_5051 hdr edited
by disavian on flickr

There are many iPhone apps that offer you views of your Google Analytics data in a phone-friendly format, at a variety of price points. The one that I suggest is free and easy to use: Analytics by Applidium. Downside: you have to put your Google email and password into the app, so that involves a certain amount of trust.

While I may have graduated, many people I know have not done so yet, and ask me what classes I found the most useful. Here’s a short list for anyone looking to take something meaningful. Read more »

Someone recently sent me a kmz file (Google Earth), but I don’t have Google Earth installed, and couldn’t be bothered to put it on my system at the time. How do I quickly view the contents?

Well, you need a url to the file. The easy way is to put it in the public folder of your Dropbox. Copy the public link, go to google maps, and drop that url into the search field and hit search. The contents of that kmz will now be on your google map. Nifty.

Alternatively, a kmz file is a zipped kml file, so you can rename it to have a .zip extension and unzip it, then open up the kml file inside it and (finally) google the location(s) manually. However, the previous method is probably faster.

Traditionally, if you’re running AutoHotkey and want to use the Program Files directory in a path, you’d use the built-in variable %A_ProgramFiles% which would parse out to wherever the directory was located. So, to open Putty (assuming it was installed) you’d have this code:

Run %A_ProgramFiles%\PuTTY\putty.exe
WinWaitActive PuTTY Configuration

We run into trouble when we run a 64-bit operating system and a 64-bit AutoHotkey, as %A_ProgramFiles% then resolves to C:\Program Files but the PuTTY executable is actually located at C:\Program Files (x86)\PuTTY\putty.exe. I just so happened on this problem, and Google yielded a solution from this forum thread.

I took the following code from that thread:

EnvGet, ProgFiles32, ProgramFiles(x86)
if ProgFiles32 = ; Probably not on a 64-bit system.
    EnvGet, ProgFiles32, ProgramFiles
EnvGet, ProgFiles64, ProgramW6432
MsgBox % "32: " ProgFiles32 "`n64: " ProgFiles64

And turned it into the following functions:

ProgFiles32()
{
    EnvGet, ProgFiles32, ProgramFiles(x86)
    if ProgFiles32 = ; Probably not on a 64-bit system.
        EnvGet, ProgFiles32, ProgramFiles
    Return %ProgFiles32%
}

ProgFiles64()
{
    EnvGet, ProgFiles64, ProgramW6432
    Return %ProgFiles64%
}

Thus when I want to call PuTTY (and have my code be portable to users of multiple bit-ness), I now do the following:

ProgFiles := ProgFiles32()
Run %ProgFiles%\PuTTY\putty.exe

Powered by WordPress and theme developed using WordPress Theme Generator.
Copyright © Andrew Guyton. All rights reserved. Feeds: Entries (RSS) and Comments (RSS).