Archive for 'Tech'

Search PDF files using Windows Search in Vista and Windows 7 64-bit

If you wish for searches via the Start Menu or Explorer search boxes to search the contents of PDF files, you need to install Adobe’s iFilter.

You can get the version for 64-bit Windows, or if you install Adobe Reader you’ll get it for 32-bit Windows.

Why Windows Home Server is awesome…

I forget I even have it.

I don’t think there can be any better recommendation for a backup solution.  My computers are all backed up daily, and I don’t even know it happens.

On top of that, there’s so much more that can be done with WHS.  A list of some things I use my WHS for:

  • Storage. I keep smallish hard drives in my PC’s (most of them are around whs_places250GB) and then put big honkin hard drives in my WHS.  Each of the indicated places in the screen shot on the right (take from Explorer in Windows 7) points to storage on my server.
  • Reliability.  You can selectively enable folders on the WHS to be “duplicated”.  What this means is that every file in that folder is stored two times…on seperate hard drives.  This is done transparently to the end user so you don’t have to worry about knowing which copy is the newest.  The benefit is that if a hard drive dies (it will), your important data is not lost.
  • Reliability, Part Deux. In addition to the safety of data stored on the server, the safety of each of my computers is important as well.  If your hard drive in one of your PCs dies, or you royally screw up your system messing around, or some sort of malware just totally infests you, WHS makes it easy to restore your system.  You just pop in the restore cd and reboot your computer.  As long as your BIOS is set to boot from CD (if not, it’s an easy thing to turn on), the restore cd will take over and let you pick a backup from your WHS to restore.  By default, WHS keeps one backup for each of the previous 3 days, one for each of the previous 3 weeks, and one for each of the previous 3 months.  I set it to keep a just-fresh-from-a-new-OS-install backup so it’s easy to go back to that point.
  • Development. I do a bit of hobbyist programming.  Because many of the things I write depend upon a MySQL database, I installed MySQL on my WHS.  This allows me to test my scripts on my local LAN.

Upgrading your AT&T Tilt to Windows Mobile 6.5 (tutorial)

I’ve been meaning to look in to how to do this for awhile, and finally worked up the willpower to do it…

Here’s how you can upgrade your AT&T Tilt to Windows Mobile 6.5.  Why would you want to do this?  Well…it’s new!  6.5 brings some nice feature upgrades, as well as generally making the whole operating system more finger-friendly.  Here’s a couple screenshots of my phone now:

WM 6.5 Today Screen from the TPC Elite Series ROM

WM 6.5 Today Screen from the TPC Elite Series ROM

WM 6.5 Start Menu

WM 6.5 Start Menu

One last thing before we get into it.  It seems like there’s a lot of stuff to do to make this work.  Keep in mind that most of this stuff is only done once.  Every other time you want to change your ROM it will be much easier.

Ok, on to the tutorial.


Read more

My program for hotkey switching between speakers and headphones…

…has been updated.

Herein find out how to survive a nuclear war.

Picture taken of the atomic bombing of Nagasak...
Image via Wikipedia

Michael Anissimov talks about the book, Nuclear War Survival Skills by Cresson Kearny.  Some interesting stuff in there…

Kearny points out that many casualties in a nuclear attack might be due to people running to windows in major cities, looking at the sky lit up by SLBMs, only to be killed by blades of glass when otherwise-survivable ICBMs explode.

A hotkey to switch between headphones and speakers. Soundswitch.

I use USB headphones. I also use regular speakers connected to my sound card. Windows makes it a multi-step process to switch from headphones to speakers.  However, a nice thing about Windows 7 is that changes to the output and recording device take place immediately and you don’t have to restart the current app.  For example, if you’re playing a game on speakers and use the configured hotkey to switch to your USB headphones, the sound immediately starts playing back on the headphones.

I tired of this, so I wrote a program to rectify the situation and I called it Soundswitch because I’m a wordsmith. You can find this program here:

soundswitch_v2.03 – (latest version)

sound_switch_v2.01

Basic Use and Installation

Unzip it to the directory of your choice.

Look in the Sound applet in control panel to see which two sound devices you want to switch between. In the following image, the two I switch between are labeled 1 and 4. Thus, in the ini file, I used 1 for Source1 and 4 for Source2.  Update:  Note that the number of items will vary based upon whether you have “Show Disabled Devices” and “Show Disconnected Devices” checked (Right click anywhere in the list to see these).  For the purposes of Sound Switch make sure both options are checked before counting the items. The screenshot below doesn’t reflect this.

sound_panel

The ini by default has the switch key assigned to Ctrl-Alt-F12. Edit this as you like.

Tested on Win7 x64 and Vista x32.   Update:  XP no longer works with the latest updates.  Use this older version for XP compatibility:  soundswitch

Any comments on this are welcome and I’ll try to fix any bugs reported.

Version 2 Notes

I’ve added a good number of features in the latest version. All accessible through the .ini file.

  • “Scroll” through each enabled item in your Sound panel.
  • Hide the tray icon
  • Switch between two speaker configurations for your current active playback device
  • Switch/scroll just the default comm device, default playback device, or both
  • Hotkey to terminate the program

JSON feed for Source servers

I’m kind of a statistics whore.

To further my pursuit of more statistics, I’ve developed a Python CGI which provides a JSON feed of all sorts of information about servers based on Valve’s Source engine.

This script has three dependencies outside of what is in the standard Python library:

Once you have those installed (worst-case scenario just drop them in the same directory as sourcejson.py), you need to edit sourcejson.ini.  This file just has three options: rcon_pass, ip, and port.  If you don’t have the rcon password for the server you wish to monitor just leave it blank.

To access the JSON feed just use the url to sourcejson.py.  Something like this:

http://YOUR_DOMAIN/sourcejson.py

To access the extended information that having an rcon password allows use:

http://YOUR_DOMAIN/sourcejson.py?info=extended

If you use the extended format, but haven’t provided an rcon password in sourcejson.ini, it will just default to the basic feed.

Included in the zip is a .htaccess to prevent directory listings, which will help protect the contents of sourcejson.ini.

Download sourcejson here!

Using Python 2.6 + MySQL on Windows is nearly impossible

Update:  I made progress on this issue.  See my newer post here.

If you’re interested in writing Python scripts on Windows which access MySQL databases, be sure you avoid Python 2.6.

The standard way to interact with a MySQL database via Python is to install the mysql-python package The problems arise because of several things.

  1. mysql-python still doesn’t have compiled binaries for 2.6
  2. Windows doesn’t ship with a C compiler.
  3. It’s a SOB to use any of the free C compilers to compile from source.

A couple of kind souls have provided their own compiled versions in this forum thread, but neither of the provided versions works on the two Windows machines I’ve tried them on.

I tried following the official directions to compile on windows using the “setup.py build”-method, but MinGW spits out several bajillion lines indicating the following(bolded part indicates error found over and over again):

C:\Program Files (x86)\MySQL\MySQL Server 5.1\lib\opt/mysqlclient.lib(./mysqlcli
ent.dir/relwithdebinfo/inftrees.obj):(.text[_inflate_table]+0×4e3): undefined re
ference to `@__security_check_cookie@4′
collect2: ld returned 1 exit status
error: command ‘gcc’ failed with exit status 1

There’s very little useful information to be found from a google search on this, so as it stands, I’m pretty much unable to use Python 2.6 + MySQL.

I really wonder why MySQL support isn’t packaged with Python.  It’s not like accessing MySQL is an unheard of operation…

Three events do not an “issue” make.

Xbox 360 Wireless Controller
Image via Wikipedia

Referring to a few stories they’ve done about violence associated with gadgets, in this item on Gizmodo, Sean Fallon asks:

In the last few months we have seen a runaway teenager die after having his Xbox 360 taken away, a teenager kill his parents over Halo 3 and 30-year old brothers stab each other over a PS2 controller. Naturally, this begs the question—what the hell is going on here? Is this a parenting issue, a social issue, or a scary psychological disorder that needs to be taken more seriously?

This paragraph seems to imply there’s some sort of pattern to analyze here.  Three examples don’t show a pattern.  Especially given the hundreds of millions of gadgets out there.

Automatic MP3 organization using AutoIt

Somebody on the Something Awful forums asked me about my code that automatically organizes MP3’s I download, so here’s how it works…

Read more