Guitar Hero 3 using drums instead of a guitar

I'm not sure how he got his drum controller to 'hold down' the long notes. If he just set it up to always hold down the last note he played, the multiples wouldn't work right; only one of them would be held down. He may be using his feet, but it's hard to tell. He definitely uses his left foot for the wammy bar.

Biggie Smalls' reference tracks for Lil Kim

These are reference tracks that Biggie Smalls did for Lil Kim to help her with her "rhyme sequence and structure." Pretty bizarre to hear Biggie doing these. Lyrics NSFW.

Detecting a user's browsing history using javascript

Generally, the user's browsing history is off limits to any client-side scripts. However, using a clever security loophole and checking the color of specific links after they're rendered, you can tell which links are "visited" and which aren't. By default, visited links show up as purple and unvisited links show up as blue.

This bug has been around since 2002, so I doubt it will be fixed anytime soon in firefox (and certainly not in IE).

Interactive Video Object Manipulation

The computer vision techniques in this video look amazing. Some of the applications demoed here are not that exciting, but I can definitely see using the same kind of software in future products for the blind community. I'm curious how long it takes to process a movie before you can manipulate the objects, or if it is close to real time.

World Clock

Seems like a stripped-down version of this advertisement for sprint.

Strobe light & waterfall

I wonder if it looks that way in real life, or if it only works because the strobe light frequency matches the FPS of the movie.

Apple Confuses Speech with a DMCA Violation

I always thought that you couldn't copyright or patent a file format. The recent Bilski decision makes Apple's position even weaker.

Welcome to the Schmapple Store

Popular accessories: Asymmetrical Haircut, Howie's Jacket, Camper Shoes, Elfin girlfriend, Ironic Military longcoat (blue), A Faint Smirk Of Superiority, And a bad RSS habit.

26-Year-Old To See Every Asshole He Ever Went To High School With On Night Before Thanksgiving

For the fifth straight year, Jordan McCabe will return home for the holidays and spend the night before Thanksgiving running into every smug and unlikable asshole he ever went to high school with, the 26-year-old reported Monday. The trip back home, scheduled for later this week, will reportedly bring McCabe face-to-face with an endless string of pricks from his past, each of whom he will have to engage in awkward conversation, and generally pretend to be happy about seeing again.

Can't wait for my 10-year High School reunion on Saturday!

Changing a domain name using mod_rewrite and PHP

Recently at work, we decided that we wanted to change the domain name of one of our customer-facing websites. The website itself would stay the same, content-wise, but we wanted people to start using a different domain name to access it, and use this new domain in some marketing materials. We had lots of users that had bookmarks using the old domain name, and we wanted to be sure those continued to work. Also, we needed to make sure any inbound links from other websites also continued to work.

One easy way to solve those problems is just to set the new domain up as a ServerAlias in the httpd.conf file. That way, anyone using either the new domain or the old domain will get exactly the same content. There are two problems with this however. The first is that users who continue to use the old domain name don't know about the new one (this was important to the marketing folks).

The second problem is what happens to our site when Google or another search engine crawls it. The search engine will crawl the two domains as if they are seperate websites. They don't know which one you want to be the "official" site, so when they presents search results to the user, they may use the wrong domain (or worse, show both). This is even more of a problem if you have, say, 20 domains and you want them all pointing to one set of content.

To solve these problems, we need to send the client an "HTTP/1.1 301 Moved Permanently" header when they access any content using one of the "secondary" domain names. There are many ways to do this; the way I did it uses apache's mod_rewrite and a simple PHP script.

In this example, I'll assume that we want alice.com to be my primary domain name and bob.com and carol.com to be two secondary domains that redirect to alice.com. Here's the relevant section of my httpd.conf:

<VirtualHost xxx.xxx.xxx.xxx:80>
    ServerName     alice.com
    DocumentRoot   /var/www/alice.com
</VirtualHost>
<VirtualHost xxx.xxx.xxx.xxx:80>
    ServerName     bob.com
    ServerAlias    carol.com
    DocumentRoot   /var/www/redirect
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteRule ^(.*)$ redirect.php?goto=$1 [L]
    </IfModule>
</VirtualHost>

We have two virtual hosts set up. The first is the main website serving alice.com. It uses the /var/www/alice.com directory, which is where all of the content of our main site resides. The second virtual host responds to all requests sent to either bob.com or carol.com. The DocumentRoot for this host is /var/www/redirect, but there won't be any of our website content in that directory. The only thing in that directory will be a single PHP called redirect.php.

The single RewriteRule directive has the affect of taking any request for this virtual host and serving up redirect.php instead. The path that was requested by the user gets passed to the redirect.php script in the query string. For example, if a user types in "http://bob.com/contact.html", apache will serve /var/www/redirect/redirect.php?goto=/contact.html.

In the PHP script, we have to send the 301 header, and then tell the browser where the document moved to:

<?php

    header("HTTP/1.1 301 Moved Permanently");
    header("Location: http://alice.com".$_GET['goto']);

?>

And that's it. Now when anyone tries to visit a URL on bob.com or carol.com, they will get a 301 header and the browser will redirect them to the correct page on alice.com. Search engines will also update their indexes to reflect alice.com the next time they crawl the site.

Microsoft Examines Causes of 'Cyberchondria'

On Monday, Microsoft researchers published the results of a study of health-related Web searches on popular search engines as well as a survey of the company’s employees. The study suggests that self-diagnosis by search engine frequently leads Web searchers to conclude the worst about what ails them.

I was convinced my shin splints was a blood clot in my leg. I am such a cyberchondriac.

Apple stock climbs 10%

Not really newsworthy except for the fact that I was reading this article yesterday. I had been thinking for a few weeks that it was a good time to buy some stock in AAPL, if only because I love their products and it would be fun to root for them.

Today's rise has been attributed to the belief that Apple's new Macbook line is poised to take customers away from Microsoft. I know that since I switched to Apple with my purchase of an iMac in May I haven't looked back, and I would definitely recommend Macs over PCs to friends.

Impossible project: Bug Finder

Somebody submitted this request to "Get a Coder," a website that hooks up freelancers with people that need some programming done. Unfortunately these coders have never heard of the halting problem.

Disney's Haunted Mansion as Counter Strike map

This is impossibly accurate. I've been on this ride three or four times, and this map is spot on. I have no clue what kind of tools are used to build these maps, but it seems to me this would take someone a very, very long time.

How We Drive

Blog to accompany the book I just started reading, "Traffic" by Tom Vanderbilt.

iPhoto Slideshows and YouTube

Over the past couple of weeks my fiance has been putting together a slideshow for her grandfather's 80th birthday. She's been using iPhoto on my new iMac, and after a bit of trouble getting some old slides scanned (she bought one of these), the results are pretty awesome. The automatic Ken Burns effect combined with music in the background really gives it a professional feel.

She wanted to share the finished product with her mother before the party, so I suggested we post the slideshow to YouTube. I exported the iPhoto slideshow to a quicktime movie using the "Export..." option in the File menu. When I uploaded the finished product to YouTube, however, there was no sound. A quick googling identified the culprit as DRM -- the songs that my fiance had downloaded were protected AAC files downloaded from iTunes. When iPhoto exports to a quicktime movie, the DRM goes with it. YouTube's computers that process the uploaded files can't play the songs.

After choosing some new songs (erm...the same songs sans DRM), I re-exported the movie and uploaded to YouTube again. This time, things looked good -- I started the movie, and the first song began to play. But when the movie got to the end of the first song (there were 3), it went silent. The second and third songs weren't playing. I first thought that I must have incorrectly added DRM'd files to the slideshow again, but that wasn't the case. I played the .mov file locally using Quicktime, and all the songs in the movie played fine.

I'm not positive, but I think what's going on is YouTube is having trouble interpreting the .mov file. A .mov file is a wrapper which contains some encoded video and audio. I think iPhoto is putting the three songs into the .mov file seperately, and YouTube is just grabbing the first one and ignoring the other ones. To work around this problem, I spliced together the 3 songs into one long file using Audacity, and used that as the music for the slideshow. This worked, but it was a combersome process.

China fails at irony

The new Guns N' Roses album "Chinese Democracy" will be banned in China. I really enjoyed Use Your Illusion I and II when I was in high school, but I doubt I'll enjoy Chinese Democracy as Slash wasn't a part of it. I loved his themes on songs like 'Estranged.'

Head tracking with the Wii remote

This is a demo of software that uses a Wii remote to track where your head is relative to the screen. The software can take that information and change the image on the screen to give the illusion of a "window" into a three dimensional space.

This is very different from the technology used in, e.g., a 3D IMAX movie. In those movies, you wear special glasses that cause slightly different images to be seen by your right and left eyes. The small differences between the images is interpreted by your brain as depth.

With the technology shown in this video, the illusion of three dimensions is produced by parallax when you move your head around. Parallax is what happens when things at different distances move across your field of view at different rates. If you look out the window of a moving car, trees that are close to you move much faster across your field of vision than trees that are far away from you.

Head tracking is even better than conventional 3D for games, because (as demonstrated at the end of the video) you can move around your living room and change your line of sight. The effect is truly immersive.

Bike Hero on Expert

A response to this viral marketing campaign, which I thought was pretty well done even though it's obviously fake. The crazy guy in the expert video is the same guy that did this awesome video for YYZ on Guitar Hero 2.

The End of Wall Street's Boom
The funny thing, looking back on it, is how long it took for even someone who predicted the disaster to grasp its root causes. They were learning about this on the fly, shorting the bonds and then trying to figure out what they had done. Eisman knew subprime lenders could be scumbags. What he underestimated was the total unabashed complicity of the upper class of American capitalism.