Monday, October 22nd, 2007
We love our little 4-month-old Chihuahua we adopted on 20-Oct-2007. He also loves to play with his inverted self in the mirror …
Monday, October 22nd, 2007
We love our little 4-month-old Chihuahua we adopted on 20-Oct-2007. He also loves to play with his inverted self in the mirror …
Wednesday, October 17th, 2007
Clean up your Contextual Menus
Thanks to this TidBITS article, I was tipped off to find this Mac OS X Hint about how you can rebuild the Launch Services database that determines which applications show up in your “Open With” contextual menu. My Open With had a huge amount of cruft accumulated over time with Classic apps, apps on my backup hard drive, and an annoying number of image droplets in the Photoshop/Samples/Droplets folder.
So I rebuilt my Launch Services database to make my Open With much cleaner and faster. Here’s how I did it.
Eject my backup hard drive so that the database doesn’t include duplicate copies of all my applications.
Archive the Photoshop/Samples/Droplets/ folder (right click, Create Archive, then delete the folder).
Add the following line to my ~\.profile so typing the lsregister command is easier. (alias ... should all be on one line)
# make launch services register easy to find
alias lsregister='/System/Library/Frameworks/
ApplicationServices.framework/Frameworks/
LaunchServices.framework/Support/lsregister'
Save a description of the old database (out of curiosity, not necessary).
lsregister -dump | less > lsregDumpOld.txt
Rebuild the database. (all on one line)
lsregister -kill -r -f -domain system -domain system
-domain user "/Applications"
Save a description of the new database (again just curious).
lsregister -dump | less > lsregDumpNew2.txt
The new database is now about 1 MB, down from the original 6 MB. There sure was a lot of junk in there!
Tuesday, October 16th, 2007
Steve vs. Alan on Hearing High Stuff
I can hear up to 17.1kHz. Steve can only hear up to 14.7kHz. So I win this round. Although maybe that means he can save more disc space and compress his MP3s a little more?
If you want to perform your own test, you can use Python on Windows as follows:
from winsound import Beep
Beep(14000, 1000)
14000 is the frequency 14kHz and 1000 is beep duration 1000ms (1 second). Crank up the frequency until you can’t hear it.
Update: alternate MATLAB one-liner for doing the same:
f=15000;fs=44100;sound(sin(f*2*pi*[0:fs-1]/fs),fs)
Update 2: Paul says he can hear up to 16.9kHz well but also claims to faintly hear 18-20kHz. I think that means he wins, because I cannot hear above 17.1kHz at all. He said he used headphones whereas I used crappy laptop speakers, so I consider that cheating a little.
Update 3: So apparently, the results are very dependent on the speakers being used. I tested Amanda at home using the Bose speakers and she can hear up to 17.5kHz. Funny thing: with these speakers, I can hear up to about 18.4kHz. Not sure what to make of that except that I’m winning again.
Monday, October 15th, 2007
Maybe the funniest SNL Digital Short yet.
Monday, October 15th, 2007
Hidden Dictionary on The New York Times
Woah, I just randomly double-clicked a word while reading an article nytimes.com and it popped up a definition/theauraus with information on that word. Seems to work while reading articles, but not on the front page.
It is actually more than just a dictionary. For example, go read about Led Zeppelin finally doing digital downloads and when you click Zeppelin, it gives a short bio on the band. Says it’s powered by Answers.com.
Saturday, October 13th, 2007
Hack the iPhone is the best site that collects iPhone hacks, how-to’s, and downloads. Installer.app is a package manager that lets you install, update, and uninstall a great variety of 3rd party iPhone software. Awesome. Finally, iFuntastic lets you change your icons, backgrounds, and install apps.
Update: The iPhone Dev Wiki gives the most updated info on current hacking status, including a list of working native apps.
Also, iPhone Alley has some great news and guides.
Also also, iPhonegoboom has good warnings.
Saturday, October 13th, 2007
Great Python articles, books and downloads. Visit and enjoy. I especially enjoyed this optimization of a log file parser.
Some other interesting articles:
Friday, October 12th, 2007
I’m starting to really like the Humanized weblog. A few interesting articles:
Thursday, October 11th, 2007
Adam Engst of TidBITS has me convinced to try Twitter.
Thursday, October 11th, 2007
Suppose you are using Subversion to manage your code and find that you’d like to include revision information within a file. You might read this and think it won’t work, but do not be dismayed. You really wanted to look at Keyword Substitution in the Subversion book.
There you will find that enabling substution on a file is rather easy. Say you have some code in Spam.py and you’re running TortiseSVN. Then, the basic process is:
svn:keywords with value Date Revision Author HeadURL Id$Id$ in the docstring of Spam.py. Id is a summary which, after checking in, expanded to "$Id: Spam.py 513 2007-10-10 23:10:30Z username $".Tuesday, October 9th, 2007
On Mac OS X, Hex Fiend handles editing of binary files beautifully. On occasion, I also need to munge around with large hex files on Windows. Today, I found the XVI32 hex editor — it does the job nicely, letting me delete out segments and re-save the result. It probably wouldn’t work as well with extremely huge files because it does everything in-memory, but for 300MB files, it works great.
Friday, October 5th, 2007
Check out this great book online (there is a print version too).