YouTube Instant - Really fast YouTube search.
It started out as a bet with my roommate, Jake Becker. I bet him I could build real-time YouTube search in less than an hour. Sadly, I lost the bet – It took me 3 hours to finish it, and another couple hours to polish the user interface into what you see now at YTInstant.com. But, I’m happy with the result.
It got 1 million visitors within 10 days of release, and the YouTube CEO, Chad Hurley, offered me a job over Twitter.
Also, see the related Instant.fm project.
Posting this code here now, since I've recently been asked for the original code several times. Until now, the only YouTube Instant code that's been available is the minified version on the live website and the unfinished coffee-script port I started and put here on GitHub. So, here's the orignal code now. For you.
The code is pretty terrible, but that's part of the beauty of the whole thing. None of Us Knows What We're Doing and "Done is better than perfect" are totally true in this case. For a better representation of my programming ability, see my more recent repos.
Copyright (c) 2012 Feross Aboukhadijeh
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.