The Olympics are in full swing, and I've really been enjoying watching them. I spent some time tonight figuring out how to stream the BBC's iPlayer. While doing the research, I figured out how to easily stream the BBC's coverage of them on my Mac, for free. It involves a bit of terminal hackery, but isn't too bad for a layperson.
First, open up Terminal.app. Then do the following:
> cd /etc
> sudo mkdir resolver
> cd resolver
> sudo sh -c "echo 'nameserver 18.104.22.168nameserver 22.214.171.124' > co.uk"
> sudo cp co.uk bbchdsodsecure-f.akamaihd.net
> sudo killall -HUP mDNSResponder
So, this will set up two new nameservers for tunlr.net. But the nameservers will only be set up for any sites under the *.co.uk and *.bbchdsodsecure-f.akamaihd.net domains. The final line will flush the DNS cache on Mac OS Lion and Mountain Lion (all versions are here).
I previously had a script that notifies me of updates to Homebrew packages via Growl. However, I recently upgraded to Mac OS 10.8 Mountain Lion. And since Mountain Lion has a Notification Center built-in, I figured I'd try to use that method of notifications rather than Growl. I found terminal-notifier which seemed to be great for this purpose. So I updated my script to use terminal-notifier and published the script as a gist. Make sure that you have terminal-notifier installed first (just run gem install terminal-notifier).
Assuming the script is at ~/bin/brew-update-notifier, you can install the script to a crontab by running sudo crontab -e, then adding the line 0 12 * * * /Users/<username>/bin/brew-update-notifier to the end of the file (substituting <username> for your username, or wherever you've put the script). I've chosen to run the script every day at noon because ...
I frequently find myself wondering if a bug in a Python package has been fixed and whether there is an upgrade for that package that might fix the bug. So I find that I end up running pip freeze and then having to compare the package versions to those on PyPI manually. Well, anytime you say "run X manually", you're being a chump.
I just saw down and wrote a script to get the list of currently installed packages in the current environment (so it works with virtualenv). Then it checks to see what the latest version of the package is on PyPI and prints out the status. If you work with Python and packages, this is awesomesauce.
Over the weekend, I finally upgraded my system to Mac OS Lion. I also took the opportunity to do a completely fresh install of my system, doing a final TimeMachine backup before erasing the hard drive and then installing Lion off a USB thumb drive.
I have long used MacPorts as my open source package manager, but I've had issues recently with certain ports not being updated or being out of date. So I was really interested in Homebrew. The fact that it is all on github, open and actively developed really appealed to me. After getting it up and running, I wanted to port my package update notifier to use Homebrew. Doing so was really quite easy. Here's what I came up with, which is also in my dotfiles on github:
Assuming the script is at ~/bin/brew-update-notifier, you can install the script to a ...
Today was World Backup Day, and, in the footsteps of Ars, decided I'd detail my current backup strategy. I first started backing up regularly after an incident back in college. One day the hard drive in my laptop began making the telltale sounds of imminent failure. Then the computer stopped booting. And I hadn't backed up the drive in several weeks, which would have caused me to lose a bunch of data. I ordered a new drive, and just before I was about to install it, I was luckily able to boot my laptop and then copy the data off of it, losing nothing. Since then, I've been an big advocate of backups.
My primary computer is a Macbook Pro. Since it is also the computer that all my photos and important data is on, I don't want to lose any of it. Every day I make sure to plug in my 1 TB external hard drive that Time Machine mirrors the contents of drive to. So at all times, I've got a backup of my drive and a history of the files. I also have another external drive that I keep at my parent's house in their safe that is filled with Time Machine backups. So if my house blows up, I have something to fall back on. The problem with that disk though is that it is several months out of date. And that sucks because my data changes all the time.
But thats not all for my laptop. I also make use of CrashPlan. At home, I also have a Linux box with a 4 hard drives in a RAID 5 setup, so if one drive dies, I don't lose any data, I can just replace the drive. So I ...
I wrote a quick little script this morning to notify myself of updates to MacPorts via the Mac OS X notification app Growl. The script is a bash script that is designed to run as root from a cronjob (as the port sync command requires root permissions). You can find the script committed in my dotfiles repository on github. For convenience, I pasted the script below, though the copy on github will always be the most up-to-date copy:
Assuming the script is at ~/bin/port-update-notifier, you can install the script to a crontab by running sudo crontab -e, then adding the line 0 12 * * * /Users/<username>/bin/port-update-notifier to the end of the file (substituting <username> for your username, or wherever you've put the script ...
I ran into this issue, and couldn't find a resolution anywhere online. Well, I figured it out, and thought that I'd put it online for others to find.
The issue was that I got exception tracebacks when sourcing the /usr/local/bin/virtualenvwrapper.sh script upon bash initialization. However, the exception happens while Python is running it's atexit handlers. So the stack was only 3 levels deep. I'm running virtualenv and virtualenvwrapper on my Ubuntu 9.04 server.
I've wanted to recently upload some of my pictures to Facebook. However, there are several things I really dislike about Aperture's built-in Facebook syncing.
First, order is not preserved. I want pictures ordered in a predicable way. Often, by date. I have yet to figure out how Aperture chooses to export, it seems to be quite random and is infuriating.
Second, tagging friends on Facebook from the built-in Aperture Faces is spotty, at best. Sometimes it works, and other times I get lots of pictures with people's names tagged, but those names are not linked to the proper Facebook friends, despite being tagged with the exact same name. Again infuriating!
Third, making any change in Aperture (adding a tag, etc), causes the photo to be re-uploaded to Facebook, creating an updated photo album feed story. I don't want this behavior. I want to export my photos to Facebook and then choose when it should be updated again. I'll let you guess my emotion.
So, what other options are there out there? Well, this guy Sean Farley created a plugin. However, it is broken on my computer. Supposedly, it does work for some people on Aperture 3, but I cannot get it to even show up in the Export menu and I get no Console messages. I've even emailed Sean twice trying to contact him and help figure out why it is broken. No response.
Finally, I've given up with these options. I'm not a prolific Facebook photo uploader, but there are times when I want to put up pictures on Facebook instead of Flickr. And I couldn't do it without exporting the photos from Aperture to my disk, and then using Facebook's photo upload.
I'm a heavy user of Apple's Aperture. I enjoy taking photos and then use Aperture to organize and do basic touch-ups for those photos. Earlier this year, Apple released version 3.0, which had numerous enhancements (my favorite is localized adjustments) and compelled me to upgrade. Since that date, I've almost been extremely close to regretting my decision every time I opened the application. Version 3.0 added a bunch of new features, but something has been killing the performance on my brand new 15" MacBook Pro. When I have the latest hardware with 4 gigs of RAM, I shouldn't have to wait 10+ seconds to enter full screen mode or to view the next photo. There was absolutely no reason for this other than the updates to Aperture. The subsequent version updates (up to the recent 3.0.3 update) did nothing to alleviate my wait-times, they only squashed bugs I ran into.
Lately, I've been using Aperture more than ever because severalrecenttrips I've gone on have left me with a ton of pictures to go organize. If it wasn't for the fact that I've got 8+ years of photos and associated metadata, I would have jumped ship months ago. I've tried all of Aperture's First Aid options (accessed by holding Option-Command when opening the app): rebuilding permissions (this shouldn't cause performance issues, but hey, I was desperate), repairing the database and finally resorting the the rebuild database option. I felt like the speed increased slightly after repairing the database and was optimistic that my problems were solved. Yet, I still had issues. I've been convinced that this has been a disk related as my memory and CPU are never loaded very heavily when I ...
I've got a several year old Linksys WRT54GL wireless router that I use for my home network. Ever since I've had the router, I've been running DD-WRT on it, which is great. The new firmware is super stable, has a great number of additional features I use constantly (DDNS, static DNS leases), but I have had a lot of trouble recently trying to get my Airport Express to connect to the network. For security, I use WPA2 Personal encryption on my network. Now, I'm not tyring to set up a WDS network, which, from the documentation, is a mixed bag to get working. So, after lots of fiddling, and lots of resetting of the Airport Express, I finally got it to work. Here is what I did.
I'm running DD-WRT v24-sp1 on my Linksys WRT54GL v1.1 with an Airport Express running the latest 6.3 firmware. On the WRT54GL, I set the wireless security mode to WPA2 Personal and the WPA Algorithm set to TKIP. On the Airport Express, I told it to join my existing network with wireless security of WPA/WPA2 Personal. Doing all this, and I can now stream music to my stereo.
I'm sure someone else will find this information useful.
I ended up still having problems, and so I switched to Tomato, instead of DD-WRT, and since then, the router has been really stable and the Airport Express connects perfectly.