mac snippets

Installing ImageMagick, mini-magick and rmagick on Mac OS X Leopard

Tagged imagemagick, attachment_fu, rails, ruby, mac, osx, leopard, mini-magick, rmagick  Languages ruby

I had no success installing ImageMagick and mini-magick with the instructions I found on this page but after some googling I found this blog post, which had the magic commands that worked for me:

sudo port install tiff -macosx  #disables the linkage with Apple's open gl
sudo port install ImageMagick

sudo gem install rmagick
sudo gem install mini_magick

To test mini-magick, open an irb console and paste in the following code:

require 'rubygems'
require 'mini_magick'

path = "public/images/0000/0003/logo.jpg"
image =

#print width and height
puts image[:width]
puts image[:height]

Deleting favicons in Firefox 3

Tagged mac, osx, firefox, favicon  Languages bash

To force Firefox to show your updated favicon (updating favicon.ico is not enough), first quit Firefox. Then issue the following commands in the terminal:

$ cd /Volumes/Macintosh\ HD/Users/christian/Library/Application\ Support/Firefox/Profiles/46xov8kt.default
$ sqlite3 places.sqlite 
SQLite version 3.5.0
Enter ".help" for instructions
sqlite> delete from moz_favicons;
sqlite> update moz_places set favicon_id = NULL;
sqlite> .quit

My Mac won't go to sleep

Tagged mac, pmset, sleep  Languages bash

If your Mac won’t go to sleep, try this:

pmset -g assertions

Check the output for details on which processes and voodo magic is keeping your iMac up all night:

Listed by owning process:
   pid 4627(cloudd)...
Idle sleep preventers: IODisplayWrangler

Things you can try:

  • Resetting the printing system (CTRL+click in the left pane of the Printers and scanners settings)
  • Unplugging external devices (USB, bluetooth, etc)
  • Voodoo