Show hidden files in OSX

I hate not being able to see my hidden files in Finder. Why it hasn’t got a selector I don’t know. Still working on moving it to Linux Mint 🙂

I’m running OSX 10.6.8 (not Lion yet).

Anyway enter the line below into Terminal:
defaults write com.apple.Finder AppleShowAllFiles YES

Then hit ALT-right-click on Finder logo in the bar and select Relaunch. Job done.

Update 01-Feb-12 Missed my refs! A big thank you to mikesel.info.

Add an opml file of Podcasts to ITunes

  1. Get your opml file (from Google Reader for example)
  2. Make sure the extension on your file is .opml (NOT .xml. If using windows or a mac, check in the command line that the .xml suffix is gone)
  3. In ITunes go to File…Add To Library and select your opml file from the browser
  4. If yougot it right you will be asked if you want to subscribe to X number of podcasts. Click OK
  5. Done

OSX: Create a Playlist From a Folder

I wanted to use this excellent command line from commandlinefu.com on the mac to create a podcasts playlist on my G1 each time I chucked some new podcast files on it. Unfortunately OSX (or BSD) aren’t exact matches to linux, so here’s my hack. It’s not elegant, too many pipes, but it works!

cd /Volumes/NIALLSG1/Music/Podcasts && find . -type f -exec stat -f "%c %N" {} \; | grep -v '\./\._' | grep -v m4v | sort -rn | sed 's/\.\//;.\//' | awk -F ';' '{print $2}' > ../podcasts.m3u

On my mounted G1 all my podcasts live in /Volumes/NIALLSG1/Music/Podcasts. I generate the podcasts.m3u to the Music folder.

The stat prints the created date as seconds from the epoch followed by the file name.

The first grep -v removes the stupid itunes symbolic links (mutter, mutter) that get copied across from the listings in iTunes, the second removes video podcasts as the Music Player doesn’t play the video.

The sort gives us the list sorted on created date descending.

The sed gives me an easy delimiter to use in the awk. A cheaty bit I know.

The awk spews out the filenames only for the write to the m3u file.

Teh usual caveats apply; your mileage may vary; be careful; etc.

Mac OSX: Things To Do First If You’re a Developer

If you’re a developer moving to a Mac may I recommend, from my own experience, you do these three things before you try and do anything at all other than using iLife or M$ Office:

  1. Install XCode Tools. You’ll need your OSX install DVD, select Optional Installs/Xcode Tools, and run the XcodeTools.mpkg. Budget an hour for it to install, hope for 40 mins. Maybe better on the Intels.
  2. Install MacPorts. It makes life so much easier than trawling the web trying to understand the esoterica of Mac OSX standard installs of various things like mysql, sqlite, python and ruby. None of them work quite the way I expect them to, and the hacking to try and understand what’s different, and then how to fix it, is so time consuming I have bypassed them and use MacPorts. It looks like a shedload of other people do too.
  3. create a .bash_profile file in your home directory. Use this for aliases (.bashrc doesn’t work).

All I can think of right now.