Fast sleep on Mac OS X

By default, my MacBook Pro goes into deep sleep (hibernate) mode when I close the lid. This is nice but I have 8GB of RAM and it is quite a slow process. Furthermore, I never went out of battery during a whole sleep process. So I’m going to avoid dumping my whole RAM content to the SSD disk and save of bit of it:

# pmset -a hibernatemode 0 # rm /var/vm/sleepimage

Should I want to re-enable hibernate mode, I’d run

# pmset -a hibernatemode 3

This enables going in sleep mode in 2 seconds, rather than a minute… w00t!

Restore Aperture library in Desktop Background

Once in a while, I reinstall OSX. I have both a SSD for the system and a SATA drive for /Users. This way, I can recover my personal files in only a few seconds. The problem is, when I do that, the Aperture library disappears from the desktop background selection.

I found a tweak on the Internet which states that you have to go to Aperture’s preferences, in the “Previews” section and unset/reset “Share previews with iLife and iWork”, restarting Aperture between switch. That didn’t solve my problem.

What worked was selecting the “Photos” view from the “Library” section and, in the “Photos” menu, “Delete Preview for Library”. Then you seem to be able to let Aperture recreates the thumbnails ; I choose to “Generate Thumbnails”. After a while, the pictures were back in the background selection.

Boot Mac OS X in single-user mode

Here’s the quick reminder on how to start OSX in single-user mode :

  • If the Mac is on, turn it off.
  • Power the Mac on.
  • When you hear the chime, press cmds

Do what you have to and type exit or reboot to return to normal mode.

Source: Mac OS X: How to start up in single-user or verbose mode