OS X Development Tricks

July 7th, 2010 chris

These are just some old notes I want to preserve on somewhat hidden features in OS X useful for development:

  • You can get smaller Finder windows with the pill shaped button on the top left. Useful if you are trying to conserve space or just like old style Finder windows
  • The Xcode default layout is similar to a lot of commonly used IDEs, such as Visual Studio and Eclipse. I spent most of my Macintosh programming time in MPW and Codewarrior, and prefer a less monolithic, overlapping window layout. You can achieve this by choosing the Condensed layout, but you must close all open projects to change it. This also makes the xed shell command work the way I want, because it brings up a new window for every file you open, instead of replacing the one you were just looking at.
  • The Finder doesn’t normally allow you to see certain files and folders, but if I’m working with Unix software, it is sometimes easier to move things around by dragging. You can open a folder in the Finder by using the shell command ‘open’, so if there is a hidden folder .libs, you can type ‘open .libs’, and up pops a Finder window for that folder. Remember, the usual permissions for your account will apply, so can can see folders like ‘/usr/local/lib’, but might not be able to modify them.

Posted in Technology | No Comments »

CoverScout & Sonos

September 15th, 2008 chris

I’ve been working on some home automation stuff lately, including building out my music system with Sonos. One of the things I’ve noticed recently is how few of my album covers are showing up in the Sonos controller. it turns out Apple changed the way they store album art back in iTunes 7, and is now incompatible with where Sonos expects to find it. Sonos looks for album art either as a tag within the music file itself, or in a file called folder.jpg in each album folder. Apple probably had good reasons for changing the location of the artwork, such as efficiency of disk space and bandwidth, but that still leaves Sonos users with a less graphically interesting screen.

Well, it turns out there’s a product from Equinux called CoverScout that will help solve this problem. It runs through your library, filling in album art using the old tag within the file mechanism. Then it allows you to find other missing album art using Amazon or Google Images. It seems to work pretty well, and is a big timesaver. There might be other solutions out there, but for $19, this was worth it for me.

Posted in Technology | No Comments »

WordPress & Apache Virtual Hosts

April 27th, 2008 chris

WordPress_logo-web.png

Yesterday I spent about 4 hours trying to figure out why virtual hosts weren’t working for me, so I thought I’d spend a few minutes writing it down in case it helps anyone else.

I had originally set up a WordPress 2.5 installation in /var/www/blog of my Apache 2 document tree. This worked fine, but I later decided to use a specific domain for the blog (cristoblanco.com), and point it at the same server. Apache has a feature called Name-based Virtual Hosts that allows you to host multiple domains on the same server with the same IP number

In Apache 2, you put your new domain config file in the /etc/apache2/sites-available directory, and then enable it by running a2ensite. After following all the instructions, it still wasn’t working for me. When I typed cristoblanco.com into the browser, it went to the top level of my original domain instead. I did the usual google searches, and tried some of the things they suggested. It’s funny what you’ll try when you feel like you’ve exhausted all possibilities. Still no luck.

I woke up this morning and thought, well let’s debug this. I put an index.html test file into the blog directory, and tried cristoblanco.com again. It worked! So, it all started to make sense. Either php wasn’t working (WordPress uses an index.php file), or it was something else. Well it turned out to be something else. WordPress needs to be configured for the domain, otherwise it just redirects back to the top level of the domain. So I used their admin tool to change the domain name, and now everything works. Seems so simple when you look back at it, but that’s how bugs often are.

I hope this helps someone.

Posted in Technology | 2 Comments »

RasterRap

April 25th, 2008 chris

Before I left Sun Microsystems in 1990, I wrote a program called RasterRap that let you draw with images. I called it RasterRap because like some rap music, art was created by sampling others works. My inspiration for this was something we did as kids: Take a blank sheet of paper and draw a big square with a particular color of crayon. Then use a different color and draw over the first color. Keep repeating this until you’re tired of it. Finally, use the black crayon to draw the final layer. Now use a fingernail and scratch off the crayon at varying levels of depth. Yes, we were super bored.

The RasterRap program was written entirely in PostScript, and the current tool (like your fingernail) would let you reveal the chosen image with a variety of effects. Spray paint, stretch, paint, and spotlight were some of the tools. Why did I write this? Pretty much the same reason I scratched off crayon when I was a kid.

raster rap

Posted in Technology | No Comments »

Hello Internet!

April 25th, 2008 chris

Just playing with my new wordpress installation. I’ve never really blogged before, so I’m not sure if I’ll take to it. Sometimes it seems like there’s too much noise out there, and I don’t want to contribute to it. If you’re an experienced blogger (or not) and have some tips, I’m interested in hearing them.

One of the things that got me interested in blogging was FriendFeed. I’ve enjoyed using it, and lots of people use their blogs as one of their feeds. Check them out.

Posted in Technology | No Comments »