All posts in Mac

Hello OpenGL World in Ocaml

I swear, if I read one more programming tutorial that starts with a recursive factorial function instead of a simple “Hello world” I’ll pray for perpetual nigerian spam on their inboxes. So, I was delighted to try out some Ocaml stuff today that didn’t involve factorials. Read more…

Building your own Twitter client with Fluid and jQuery

Like many before me, I was searching (unsuccessfully) for a decent twitter client. There are many, but most seem to be ad sponsored or based on a rather hefty framework like AIR (which by now, I guess, has been silently installed on my computer anyhow). Read more…

What’s your history|awk…

Via Bill de hÓra. Run this from the command line:

history|awk '{a[$2]++} END{for(i in a){printf "%5d\t%s ",a[i],i}}'|sort -rn|head

I get:

108 ls
78 cd
53 sudo
29 python
13 cap
9 ruby
8 vim
6 easy_install
3 bzr
1 ex
1 python2.5
1 ln
1 mksir
1 cat
1 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

In short:

  • I have trouble with my default python installation.
  • I am trying Django for small project.
  • I was hit by the Leopard keyboard repeat freeze bug.
  • I am poor at spelling simple commands.
IR glove that lights up an IR LED when the index and thumb touch

Prism – web apps as desktop apps

When people started making applications available in the browser a number of interaction challenges appeared. How do you launch a web app compared to a desktop app? How do you prevent people from navigating away from your app? The Mozilla people have been hard t work with Prism – basically a customized version of Firefox, which lets you create desktop apps pre-configured to load a certain URL at startup. The desktop app is launched like any other application. Pretty sweet as the user experience becomes more consistent. You can also customize the application icon and other parameters. Read more…

Keeping software up-to-date in OS X

I often install apps to try if they work the way I like. Some stay, some I delete almost immediately. Some of them have built in functionality that alerts you when there is an update available. I find that very annoying. If you have many apps these little reminders tend to pop up all the time.

So, I was looking for something to keep tiny apps up to date and found AppFresh. AppFresh will scan your programs folder when you want it to and alert you of any updates it can find. Downloading and installation is automated for most apps as well.

It will also tell you when you lasted used an application – nice if you want to clean you programs folder from unneccessary apps.

You can download AppFresh here.

OS X package management

Mark Pilgrim writes about the benefits of the easy-to-use package manager in Ubuntu and then feels sorry for his Mac OS-using friends. Read more…

Fixing OS X Leopard menu bar transparency

Leopard transparency fixUpdate: As many readers now noticed, as of 10.5.2 there is now a preferences setting for the menubar transparency.

For some reason Apple decided to make the menu bar in Leopard transparent. With my background image this means that the menu bar will be in a shade of blue. It doesn’t look good and makes my computing environment less comfortable (I’m picky, I know…).

Someone created a software hack to remove the transparency. There is also a system setting (thank you Johan) to trick the window manager into thinking it is in older hardware. I am not sure of the side effects so I’m not that keen on installing that. Here is the pragmatic fix: take your background image and paint a white stripe, 21 pixels high, at the top. Problem solved. My menu bar is now easy to read with black text on white background (see picture above).

Before painting the white stripe you may have to resize the picture to the exact size of your desktop, otherwise the OS will resize it and it won’t fit the size of the menu bar.

Leopard black menuUpdate: As Peter points out in the comments below, if you use black instead of white the menu will look similar to the default ash grey style of other Leopard apps.

A macbook, a bowl of water and a solar panel conected to the audio n port.

Automated iPhoto backups to Amazon S3

The combination of parental leave, a Sony A100 10 Mpix camera and the 80 Gb HD of my Mac mini server has resulted in a lot of zeroes and ones needing a place to live. I have realized that a lof of valuable photos are only stored on the HD. Should it fail the family will be really disappointed. Hence, the need for a backup solution.

I was planning to get a small RAID solution for the home network, but they are fairly expensive, need electricity and space. So, I had a look at the Amazon Simple Storage Service (S3). If you haven’t heard of S3 before:

Amazon S3 provides a simple web services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web. It gives any developer access to the same highly scalable, reliable, fast, inexpensive data storage infrastructure that Amazon uses to run its own global network of web sites.

I was expecting S3 to be fairly expensive with the redundancy and all, but it turns out that it is cheap. Really cheap. To calculate what it would cost me to backup my iPhoto library I threw together an iPhoto backup to S3 calculator.

Turns out that starting with 2000 photos at around 2 megs each, adding 100 photos each month willcost me $10/year. Hard to beat if you are trying to build your own RAID solution.

Backup software

Here is the setup I use. I tried some of the S3 client libraries available, but the only one that was persistent enough to do the initial 2000 file sync was jets3t. It is a java library that comes with some easy to use command line synchronization scripts. After setting up jets3t with your S3 API key, all you do is tell the synchronize script to check your iPhoto folder.

Currently, I run it as a scheduled job once a month, but depending on your photography habits you may want to trigger it differently. It works like a charm and last month’s bill from Amazon was $1.23.

Try the calculator and see what your cost would be.