In OSX Lion (might also be the case for older versions to), there is no direct way to hibernate a laptop except running out of battery power. The only available option is sleep, which will wake from memory; so it keeps draining the battery. It is possible to change this default behavior with the utility pmset. From the man page:
We do not recommend modifying hibernation settings. Any changes you make are not supported. If you choose to do so anyway, we recommend
using one of these three settings. For your sake and mine, please don't use anything other 0, 3, or 25.
hibernatemode = 0 (binary 0000) by default on supported desktops. The system will not back memory up to persistent storage. The system must
wake from the contents of memory; the system will lose context on power loss. This is, historically, plain old sleep.
hibernatemode = 3 (binary 0011) by default on supported portables. The system will store a copy of memory to persistent storage (the disk),
and will power memory during sleep. The system will wake from memory, unless a power loss forces it to restore from disk image.
hibernatemode = 25 (binary 0001 1001) is only settable via pmset. The system will store a copy of memory to persistent storage (the disk),
and will remove power to memory. The system will restore from disk image. If you want "hibernation" - slower sleeps, slower wakes, and bet-
ter battery life, you should use this setting.
So by default, the … Continue reading Hibernating in OSX Lion
If you rsync a sparse bundle to another Mac without the -E flag (or if you copy it to a non Mac system), you will loose the ability to double click on it in the Finder to mount it. This is because the extended attributes telling the Finder the folder is actually a bundle are lost in the transfer. The following piece of code I … Continue reading Restore sparsebundle extended attributes after rsync
OSX’s top program doesn’t quite behave like its Linux counterpart out of the box. For me, the two biggest problems are that processes aren’t sorted by CPU usage and the top program itself uses 10% of the CPU because it calculates all sorts of statistics about memory and shared library usage that I personally don’t care about. There are a series of flags that you … Continue reading Make OSX’s top behave like Linux’s top
A sparse bundle image in Mac OS X will grow as you add files to it but never shrink if you remove files inside of it. To reclaim the disk space, you must run the following command :
hdiutil compact path/to/sparsebundle
If your account is protected with FileVault, this is done automatically for you when you logout of your account.
Je refusais systématiquement de considérer l’achat de musique en ligne pour deux simples raisons : Protections DRM (détails sur Wikipedia) Mauvaise qualité d’encodage Avant hier, j’ai découvert une artiste dont la musique semblait intéressante. Comme j’essaye toujours d’encourager les artistes inconnus qui tentent de percer et que c’était en plus une Québécoise, j’ai décidé d’acheter son CD. Mais pourquoi devoir encombrer mon étagère d’une autre … Continue reading Achat de musique en ligne? Finalement oui!
Je suis tombé sur un outil très intéressant de Google Labs hier : Google Trends. With Google Trends, you can compare the world’s interest in your favorite topics. Enter up to five topics and see how often they’ve been searched on Google over time. Google Trends also shows how frequently your topics have appeared in Google News stories, and in which geographic regions people have … Continue reading Google Trends
I’m a relatively new Mac user so I’m keeping a list of some useful free apps that I’m using on my Mac. It’s a work in progress… Instant Messaging : Adium PDF Annotation : Skim Notes taking : Freemind Linux package manager : Macports (lots of my friends use fink) EquationService : Create equations from latex that can be used in Keynote MacFUSE : MacFUSE … Continue reading Useful free Mac apps