Travis's lame ol' blog

yay, Travis finally changed his blog!

- Wednesday, July 16, 2008

Replacing Notepad with Notepad 2 on XP SP3, the easiest way possible

After installing SP3 on XP I noticed that Notepad was reverted back to its crappy self, so I decided to write a handy batch script to install Notepad2 again. This script will work in XP SP2+. Place the batch file in the same directory as notepad2.exe and run it.


@echo off
echo This will kill all open instances of Notepad.
echo To cancel, end this batch file now (ctrl+c), or hit any key to continue.
echo Killing all instances of notepad running...
TASKKILL /F /IM notepad.exe /T
echo Backing up...
call :backup %systemroot%\servicepackfiles\i386
call :backup %systemroot%
call :backup %systemroot%\System32
call :backup %systemroot%\System32\dllcache
echo Installing...
copy notepad2.exe %systemroot%\servicepackfiles\i386\notepad.exe /y
copy notepad2.exe %systemroot%\notepad.exe /y
copy notepad2.exe %systemroot%\System32\notepad.exe /y
copy notepad2.exe %systemroot%\System32\dllcache\notepad.exe /y
echo Done.
goto :end
call set npath=%1
set count=0
for %%i in (%npath%\notepad.original*.exe) do (
set nname=%%i
set /a count=count+1
echo backing up to %npath%\notepad.original%count%.exe
copy %npath%\notepad.exe %npath%\notepad.original%count%.exe /y

So That's What Happened To Doogie Howser, M.D.

It's actually kinda funny.

(if you were looking for more Doogie, Hulu will save the day)


- Wednesday, May 21, 2008

JavaScript is just as easy as Ruby (even without jQuery!)

Ernie sent this ruby snippet and marveled at its brilliant simplicity:

class Date  
  def at_some_point  
end # => Tue May 21 10:23:00 -0500 2008 # => Tue May 21 02:10:00 -0500 2008 # => Tue May 21 18:28:00 -0500 2008 # => Tue May 21 07:25:00 -0500 2008

I recalled using Date.prototype in JavaScript in the past to add some helpful date functions, so I thought I'd see if I could write a similar function just as elegantly:

Date.prototype.atSomePoint = function() {
    return new Date(rand(this.atMidnight().valueOf(), this.tomorrow().atMidnight().valueOf()));

new Date().atSomePoint();   \\ Wed May 21 2008 06:33:28 GMT-0400 (Eastern Daylight Time)
new Date().atSomePoint();   \\ Wed May 21 2008 12:57:13 GMT-0400 (Eastern Daylight Time)
new Date().atSomePoint();   \\ Wed May 21 2008 08:37:44 GMT-0400 (Eastern Daylight Time)

Unfortunately .atMidnight() and .tomorrow() don't exist in JavaScript's Date object by default (that I know of), so I had to write those helpers as well as a random number helper, rand():

Date.prototype.atMidnight = function() {
    return this;

Date.prototype.tomorrow = function() {
    this.setDate(this.getDate() + 1);
    return this;

function rand(lowerBound, upperBound) {
    return Math.floor((upperBound - (lowerBound - 1)) * Math.random()) + lowerBound;

While I probably would never find a use for .atSomePoint(), it certainly was easy enough to write.

- Monday, May 19, 2008

Top 3 Vista Features that FAIL

over 40 seconds to extract a 2.33MB zip file

I installed Vista Ultimate x64 recently and there are three things that I've disabled (so far).

This one was disabled before I even slipstreamed the DVD. I didn't even have to use it to know that not only would it annoy the hell out of me, but I don't really need it since I've never had any problems in XP/2000.
The larger, crisper fonts were nice when they worked. Most software outside of the OS itself didn't support it though. Even MS's own software (like WorldWide Telescope) is inconsistent. I guess that's why this isn't enabled by default.
Window Translucency
This just seems useless IMO. It's cool that it's possible to do, but I don't think it's the best use of my GPU time.

Anyone else have any pet peeves or stuff they've turned off in their default Vista install?

(The screenshot shows the raw speed at which Vista is capable of unzipping files on my hard drive.)

- Saturday, March 29, 2008


Travis gets eyes lasered I had PRK surgery on 3/18/2008 and I thought I'd post how it went for others who're thinking about getting it. PRK is the exact same price as LASIK, uses the exact same excimer laser, but has a significantly longer heal time and is more painful. People who have poor near-sightedness, large pupils, and/or thin corneas are generally not the best candidates for LASIK, and that is where PRK comes in.

Short version: if you're as fed up with glasses/contacts as I was, you're patient and you're not a candidate for LASIK, get it. And the long version...

The Procedure (from my point of view)

I scheduled my appointment for 8am and I was up until about 3am the night before because I was so nervous. It worked out in my favor though since I was able to sleep so easily the rest of the day. We arrived at StrongVision at about 8:10am. They gave me some numbing drops for my eyes and I could feel tremendous anxiety, my extremities felt cold and clammy and I could feel the blood draining from my face. I fainted during one of the tests at my first pre-op visit, and I really didn't want that to happen during the procedure. Then they gave me a Valium to relax, and I felt much better in about 5 minutes. They took me into the laser room and gave a brief explanation of what was going to happen. Then they cleaned my eyelash area with an iodine solution, no big deal. The numbing drops work really well, it almost feels like you're blinking over empty eye sockets.

My instructions were to basically to stare at a red blinking light. With the Valium, numbing drops, and everything being blurry anyways, it was really easy to do this. They popped the little eye propper-opener into my eye in about 1 second, it is actually more comfortable than it sounds. Then they slide my head under the big machine.

From here on everything was blurry, but here's what happened from my point of view. There's a green light and another red light, ah there's the blinking red one. A ring-shaped object is placed on my eye, I feel a slight pressure as if I was resting my finger on my closed eyelid. Then a second ring is plopped on there with about the same pressure, this one is filled up with liquid, and held in place for 30 seconds. I see a white blur then the liquid is rinsed off. The stuff they rinse your eye with is ice cold, and that is the most uncomfortable part of the whole procedure. Some goop-like substance is then wiped off my eye. Another rinsing with the cold water. The light is turned off momentarily then my eye is given one more wipe before the cool part. The light is turned down again, then *BZZZ*crack*crack*crack* the laser fires up. There is a faint smell of a curling iron, but not as bad as I had expected since other people told me that was the worst part. With every *buzz* of the laser, the shape of the blinking red dot changes shape. After the laser finishes something blocks my vision for a second or two, then something white is placed on my eye, making it difficult to watch the blinking red dot. Then a translucent white disc is placed on my eye for a bit. Another swab then more squirts of that icy water, damn it's cold. A "bandage" contact is placed over my eye and a few drops placed in it. The eye-propper-opener is gently removed from my eye and I blink. My eye is closed then given a good wipe down.

At this point I can sit up and they switch the eye patch to cover my right eye and prepare my left one. They ask me to read the clock on the wall, I only see a blurry white disc. The laser runs through a few tests in the mean time, then they repeat the same procedure on my left eye. When it is finished I can easily read the clock on the wall. It is miraculous. I think I could only say "wow."

What Really Went On

They gave me a DVD of the procedure which I've uploaded to both Vimeo (higher quality) and Youtube. Watching the procedure is somewhat difficult if you're squeamish. I am still amazed at how little I felt. It's funny watching it because it looks like the most soothing part is the water squirted on my eye, and to me it was the most uncomfortable.

So here's the play-by-play of what really went on. The first metal ring scores a circle on my eye. The second ring is placed onto the score and filled with an alcohol solution that dissolves the epithelium layer of the eye. After its drained and rinsed, the epithelium is wiped off. The laser works in the UV spectrum and breaks down the carbon bonds in the cornea's cells, reshaping it. The white blur they rest on my eye is what they called the popsicle, some sort of frozen artificial tears. The white disc is Mitomycin-C, it changes the cell's mitochondria so that your eye doesn't heal too quickly, making your eye blurry. The bandage contact just reduces the chance for infection and makes it much less painful to blink. It gets removed 5 days later.

Each eye takes less than 8 minutes, and the entire procedure is less than 20 minutes. We were on the road heading home in less than an hour.


This is really the most frustrating part. The pain is very tolerable with medication, but having blurry vision is frustrating. Especially if you're like me and usually spend about 16 hours a day staring at a glowing screen. You're not supposed to read for extended periods of time either, so plan on being bored, listening to music, and sleeping a lot. The pain meds will definitely help you sleep.

The worst day pain-wise for me was the third day. Every time I opened my eye, the light felt like a hair stuck under a contact. I just kept my eyes closed as much as possible and slept most of the day. The day after was basically pain free, but was the blurriest. At day 6 I had the bandage contact removed and my vision was still a bit blurry. I couldn't even read the top line. At this point I was thinking: WTF have I done. But each day since my vision has improved noticeably.

While some people can see 20/20 after the first 5 days with PRK, it wasn't that way for me. This is really where LASIK is so much better, since you see clear right off the bat. As of 3/31, my vision was already 20/25. It will continue to get better hopefully to at least 20/20 over time (many people's vision is corrected better). The more that you blink, the more your cornea smooths out all of the imperfections from the healing process.

I'm now 2 weeks out, and the only real problems I have is a nagging head ache, the occasional blurriness when I blink, slightly dry eyes, and relatively poor night vision. The Dr. said today that all of those will get better with time so I'm not too worried. and I have another appointment 3 weeks out, and I'll be sure to post any major updates if I have any.

Update 4/22/08: Eyes were 20/20 today. I have nearly zero discomfort, aside from my seasonal allergies. I rarely use the drops any more, I wish I hadn't bought so many. Night vision is clear enough to drive and will improve over time.

local | tech

- Friday, March 14, 2008



These print out nicely on an 11x17 sheet *wink* or you can try to buy one directly from the site.

- Wednesday, March 05, 2008

Converting an AVCHD M2TS Video File Into Something Usable (for free!)

The Corel software that came with my new Canon HG10 made burning a video DVD or an AVCHD DVD a snap. Unfortunately, it came with nothing that would transcode the video files into more commonly supported formats like MP4 (or AVI) so that they can be easily edited and/or uploaded to sites like Vimeo (or Youtube or whatever). I tried a bunch of different apps (FFmpeg, Mencoder, Avidemux, MediaCoder all FAIL) but this process worked the best for me.


Three basic things needed to download:

  1. K-Lite Mega Pack - when installing, make sure that as many of the following plugins are checked as possible (it seems like they're often renamed or removed): AC3, AAC, M2TS, AVCHD, x.264, h264, MP4, M4A, Mpeg4, Haali. You may not need all of the Codecs in this install, but better safe than sorry
  2. AviSynth - download and install normally
  3. MeGui - after downloading and installing:
    • go directly to Options - Update, after updating, go there again to be sure you got them all
    • I imported all profiles that it gave me the option to, but if you want to make it easy on yourself, you can import the settings that I use: (3 KB), just go File - Import Profiles, and select the zip file with my settings
    • make sure in Options - Settings - Program Paths, that everything is correct, for me most apps were set to a subfolder of the MeGui install, but the AviSynth path had to be set to its own folder


After opening my M2TS video file in MeGui, here's the settings that worked for me:

travis1.avs - AviSynth Script
LanczosResize(1280,720) # Lanczos (Sharp)

These might just be specific to the HG10, but its native video needed to be deinterlaced using the FieldDeinterlace and it was set to top field first, whatever that means, you can find those settings out by hitting the Analyze button if you don't have a HG10 (or if you just don't trust me). The frame rate was set to 30/1001(29.97)fps for NTSC, and here I am resizing it from 1440x1080 to 1280x720 for a Vimeo 16:9 HD upload. You'll probably want to set it to the native resolution if you plan on doing a bunch of crazy editing. Be sure to hit the Save button and rename it to something else.

Then the other video settings:

AviSynth Script (above, or whatever you saved your own settings as)
Video Output
Video Profile

The travis1 video profile sets the Codec to x264, format to MP4, and bitrate to 5000, everything else I left at its defaults. If you make any changes, I'd recommend saving them to new profiles since it makes it so much easier to tweak the settings.

Here's the audio settings:

Audio Input (this is the same file as I selected in the File ? Open command above)
Audio Output
Audio Profile

The Codec that worked for me is FAAC and extension is MP4-AAC with a 128 bitrate.


Now just hit the AutoEncode button. The only things I change on this screen is the filename, the Average bitrate (5000 again), and then I just hit Queue.

Switch over to the Queue tab in MeGui's main window. Click on the New worker button in the lower right. (isn't this hard core? *wink*) Then highlight everything in the queue and send it to the worker you've created. This can be useful if you have a sweet multi-core machine and want to encode a bunch of different files at the same time. When you're ready to go, switch over to the worker window and hit Start.

Once your new MP4 (or AVI or whatever you're exporting to) file is rendered then you can go nuts and edit it with whatever you want or just upload it.

- Tuesday, February 05, 2008

Can't get enough Travis? can always check out Travis' shared items on Google Reader (XML). Also, twitter.

local | tech

- Thursday, January 10, 2008


A wonderful kind of energy,
that's E-lec-tri-city!
Si si!

Tom Glazer & Dottie Evans - Energy & Motion Songs - 03 - E-lec-tri-city

- Wednesday, November 14, 2007

Current Beard Alert Level: Chuck Norris

Current Beard Alert Level: Chuck Norris

Historically, it's never been higher than Chuck Norris, but you never know.

KS | local