Misc

Miscellaneous

I’ve been playing with an app called Proximity at work to make sure my machine is locked down automatically when I walk away. This isn’t new but it’s something i’ve been looking for. Most of this information comes from a great post by Jesse Hollington.

When my iPhone goes out of range my screen saver password is enforced, enabled and activated. It also locks all my keychains and marks me as away in Adium. When I return it simply marks me as available in Adium, you can tweak this scripts to your needs.

If you want to play with this setup, download proximity from the google code page:

I have put up the tools and applescript I’m using on Leopard in this directory. If you place these scripts into ~/bin you won’t have to edit any of the applescripts.

Here’s my configuration:

mount bind on osx?

macfuse_180x180 I’ve been using Connect360 to stream video to my Xbox but it does not allow me to choose more than one video directory to share and it will not follow links onto my external drive. This is a typical problem with a simple solution on Linux, mount --bind. I couldn’t find mount_bind for osx but a simple alternative that really shows off the utility of user filesystems saved the day.

Enter bindfs, a directory mirroring user filesystem that works with macfuse. Running bindfs /path/to/dest /path/to/link provides the same experience. Delving into the man page shows that you have tons of control over permissions of the directory mount as well.

If you plan to use bindfs on osx be sure to install macfuse from macports and save yourself the configure failure when building bindfs from source because you downloaded the dmg and ran the installer.

We’ve been running all of our services here on sizzo in linux chroots that rely heavily on bind mounted directories to share data. It wasn’t until the 2.6.26 kernel that read only bind mounts were working, which provide an extra level of data protection within the chroot. Alternatively using bindfs/fuse on linux seems like it would be another great solution, especially when more fine grained control of permissions is necessary.

osx installer Warning: If you are a dvorak user do not, I repeat, DO NOT upgrade OSX to Leopard 10.5.6. In fact if you use any keyboard layout other than US English you should probably wait as well. After upgrading you may find that you are unable to type using dvorak in some applications, or use some application shortcuts.

I got bitten pretty badly in ATOK, a third party Japanese IME, which was rendered completely useless. It wouldn’t recognize any input keyboard layout other than US English. Input layouts in Kotoeri did work fine however.

Now I’ve just finished reverting back to 10.5.5 from a backup. A quick web search turned up similar problems using Epclipse keyboard shortcuts, WOW commands and others.

Update 5/13/09: 10.5.7 is safe, apple has fixed this issue.

I just realized that I spend way to much time taking a full path w/ filename and then deleting the filename portion after pasting into cd. So here’s a little .bash_profile function that you can alias to cd to make a bit smarter.

function _cd {
  if [[ -n $1 ]]; then
    if [[ -L $1 ]]; then
      [[ "`stat -L $1 -c %F`" != 'directory' ]] && CDIR=`dirname $1`
    elif [[ ! -d $1 ]]; then
      CDIR=`dirname $1`
      [[ "$CDIR" == "." ]] && unset CDIR
    fi
  fi
 
  if [[ -n "$CDIR" ]]; then
    cd $CDIR
  else
    cd $1
  fi
  unset CDIR
}
 
alias cd="_cd"

This should allow you to use cd normall but when you do the following it will put you in the directory that httpd.conf is in:


sizzo:~ screen$ cd /usr/local/apache/conf/httpd.conf
sizzo:/usr/local/apache/conf screen$

If you use or expand this please share your experience! There are a couple known issues such as reverse traversing across links from within link directories, not sure if there’s a way around this yet. I’ll update as issues may arise.

If you’ve used terminals since the early 90’s then you might be pretty used to an old style DOS like font like me. After running windows for so long one of the hardest things about switching to OSX was finding a good font that looks something like what I was used to. This was a must have condition for making the switch two years ago.

There’s just something about the new fonts that just doesn’t work for me after spending hundreds of thousands of hours either in a text editor or at the command prompt. Of course the actual Terminal Font on windows isn’t a TTF so that’s a dead end.

What I eventually found was a True Type Font called Video Terminal Screen. This is what it looks like in iTerm on Leopard at 16pt. Text and code look great with it, well to me.

From the Archives

I’m digging deep in the archives for this one, inspired by a coworker’s own note about crosswords. His recent publication in the New York Times brought back the painfull memory of my own rejection. In light of this I have unearthed my own failed submission to the Times for your consumption.

xword_preview.jpg

If I recall, I had rated this at about a Wendnesday’s difficulty but I’m not entirely positive. If you take the time to do this then I apologize in advance for the two page pdf format. This is the only format I currently have available.

Also, it’s not too late to see Will Shortz speak at UC Berkely this may. Tickets are still available here.

Guitar Freaks

Guitar Freaks Arcade Style Controller

With the recent release of Konami’s Arcade Stlye Controller for Guitar Freaks I decided I had to order one so I could play one of my favorite games again. Not having even a playstation makes this an expensive game to import. Between the cost of the game, controller, console and mods we’re looking at over $500. Of course I could have gone with an alternate game like Guitar Hero, but Konami is the originator of the rythm game genre and GF reflects this in being much more playable than Guitar Hero.

So with the gear in hand I plugged everything in, ready to tear the game up. I started playing some of the songs I knew in Masterpiece Silver and was failing almost everything. For songs I know I could score an S on in the arcade I was getting a D or an E now! I set to searching online for the issue and found out that because my tv is an LCD based HDTV the upcoversion this can lag the display enough to make a rhythm game like this unplayable. For most games this means you’ve got to shell out about $500 for a specialized upconverter but luckily the newer Guitar Freaks games come with a timing delay setting. With my tv a setting of -4 saved the day!

Thankfully about 60% of the text in the game is in english so most things are pretty easy to figure out. There’s some good info on the game over at Game FAQS if there’s anything you don’t understand. I’m still trying to figure out why it stopped saving my progress per song but overall I’m pretty happy with it and am now waiting for V3 to come out!