Mac

Understand Your True $PATH

I recently took some time to actually understand what the hell was going on in my terminal config file (I use ZSH, but this post should apply to BASH as well). The thing that pushed me over the edge was that I was running into a situation where I had different versions of git that were being used in different situations. I was working on an Adobe Air app that was somehow using my system git, instead of the one I installed via Homebrew. I tracked the problem down to my PATH and then realized that I didn't fully understand the whole PATH thing as well as I should.

So I opened up my config and my PATH variable looked like a super long unintelligible mess (I wish I had saved a version of it for comparison). I had followed too many tutorials/installation instructions that simply told me to "copy and paste this code into terminal" and it resulted in a ton of things appending to my PATH. There were a lot of words and slashes and it was not clear to me the order in which things were loaded. So I decided to separate each individual path that was being added to my PATH, and put each one on a separate line. This really makes it clear the order in which things load, so that it is clear that things being installed from brew (/usr/local/bin) run before macports or system.

*Update*: I bought a new computer and cleaned out my PATH even more, getting rid of macports etc.

Let me know in comments if you have any questions, or suggestions for improvement.

Alfred AppleScript to Toggle Mono Stereo Audio Output

A huge pet peeve of mine is hearing only one channel of stereo music. However, sometimes I want to only put one earbud in my ear so that I can hear what is going on around me while working. So I devised a quick little AppleScript / Alfred Extension to toggle the output for when I switch from mono (one earbud) to stereo (both buds in, rocking out) and vice versa. Really, I just found this AppleScript, added the alfred wrapper, and added Growl support.

Fixing Macfusion / MacFuse for Snow Leopard - Mount SSH Drives in Mac OS X

This is just a quick heads up to anyone trying in vain to get MacFuse and Macfusion to work with the new 64 bit versions of Snow Leopard in order to mount an SSH drive. Don't listen to anyone but this guy. I have been searching for a while and following all the "fixes" that fixed the myriad problems with MacFuse coming to Snow Leopard. However, those have all been mostly fixed in the latest version of Macfusion. The thing that hasn't been fixed in even the latest beta version of MacFuse is 64 bit Kernel support.

The version of MacFuse found in the link is an unofficial beta that fixes the problem. I am not sure why it hasn't been taken into MacFuse proper (which doesn't seem to have been updated since 2008). So as a public service I am making a giant button, since it took me forever to find.

Click here to fix MacFuse for 64-bit Snow Leopard

Subscribe to RSS - Mac