os x

How to run a Unix shell script from the Mac Finder

If you ever want to create a Unix shell script that you can give to someone else so they can double-click it and run it through the Mac OS X Finder, all you have to do is (a) name the file with the ".command" extension and (b) make it executable. So, just name your Mac/Unix script like this:

ShowProcesses.command

Then make it executable, like this:

chmod +x ShowProcesses.command

You can also leave out the usual #!/bin/sh part on the first line.

One way Mac OS X lost its sexy

I just fired up my old 2006 MacBook Pro that runs Mac OS X 10.5.8, and it helped me realize why I don't like the Spaces feature in the newest versions of the Mac operating system: It used to be fun.

Linux find command: find and copy files

I ran into a situation this morning where I needed to use the Linux find command to (a) find all the MP3 files beneath my current directory and (b) copy them to another directory. In this case I didn't want to do a cp -r command or tar command to preserve the directory structure; instead, I wanted all of the files to end up in the same directory (so I could easily import them into iTunes).

Make your Mac OS X display black and white (grayscale)

I was just reminded of an old trick to make your Mac OS X display black and white, or grayscale. To do this, just follow these steps:

Mac OS X JAVA_HOME location

Since I can never remember this, JAVA_HOME on a Mac OS X system is located here:

/Library/Java/Home

I believe this is correct for Mac OS X 10.5, 10.6, and 10.7 systems.

(This is most likely the shortest blog post I've ever written. :)

 

Apache NameVirtualHost configuration using MAMP on Mac OS X

Since I can't seem to ever remember this, here are some notes on how to configure a Name Virtual Host (NameVirtualHost) on an Apache web server. In particular, this is from the httpd.conf configuration file that I use with MAMP on one of my Mac OS X development systems.

In short, as I'm developing two different applications, one named "cato" and another named "zenf", these are the important name-based virtual host lines from my Apache configuration file:

First Mac Ruby Appscript examples

I just took a brief look at Ruby Appscript as a potential replacement for AppleScript on Mac OS X. So far it looks promising, and works on Mac OS X 10.6 (Snow Leopard) just fine.

The hardest part about working with it yet has been finding a few examples to get going with. Based on my forty-five minutes of working with it just now, here are a couple of quick Ruby Appscript examples that might help get you going a little faster.

How to schedule an automatic Mac wake up time

Summary: How to schedule a Mac automatic wake up time (or sleep time).

While answering a reader's question about an unrelated Mac issue, I stumbled onto a solution of how to wake up my Mac at a specific time every day. This is very cool for me, because it fits in very well with my Mac AppleScript iTunes alarm clock.

Mac crontab - Mac OS X startup jobs with crontab, er, launchd

Mac OS X crontab FAQ: How do I run a Unix job (or shell script) through the OS X crontab facility? I keep trying to edit my Mac crontab file, but my Mac OS X system won't save my crontab changes, or run my program (or shell script).

Mac OS X - crontab, launchd, and launchctl

As of this writing (updated in 2011), the Mac crontab command seems to be deprecated on Mac OS X, and the Apple documentation encourages you to use their "Mac launchd" facility. Here's a blurb from the Mac OS X crontab man page:

How to make Mac backups with burn folders

Mac backups and burn folders FAQ: How do I make Mac backups (CD/DVD backups) with Mac burn folders?

Wow, I've become a big fan of Mac OS X burn folders lately. Once I realized how much they simplify the process of making Mac backups I've been completely sold on them. Mac burn folders make the Mac backup process so easy I actually take the time to make them on a regular basis.

Syndicate content