Technology

Fast sleep on Mac OS X

       100 words, 1 minutes

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

Continue reading...


Move WordPress admin bar to the bottom

       77 words, 1 minutes

I’m building a WordPress theme that has a fixed top menu bar. Hence, the admin bar supersedes it ; and that’s not nice. So I just wanted to move it to the bottom of the page, where nothing lies. You will just need to add the following code to your functions.php file:

Continue reading...


Monitor a Synology NAS with Munin

       424 words, 2 minutes

My Synology DiskStation DS409slim is, via the DSM software, SNMP aware. This means I can poll it to get some information using a SNMP capable monitoring system. This is how I configured Munin to grab some metrics from the NAS.

Continue reading...


Automatic HTML numbered headings

       248 words, 2 minutes

Quoting W3C, “(…)A heading element briefly describes the topic of the section it introduces. Heading information may be used by user agents, for example, to construct a table of contents for a document automatically(…)”. When write a bunch of HTML text, I usually use heading elements to separate chapters and sections. The thing is, by default, those headings aren’t numbered. And when the article is quite long, this may lead to a “where am I” sensation. Here’s a quick way to automatically generate numbered heading elements from standard HTML and CSS code.

Continue reading...


Add a Table of Contents in WordPress articles

       79 words, 1 minutes

I use to have TOCs in articles when this site ran DokuWiki. But by default, WP doesn’t provide this ability. After a few Googling, I found the Table of Contents Plus plugin. I choose this one for two main reasons: it can automatically insert a TOC in WP since “X or more headings are present” ; it has various looks embedded to match your theme. You can have a look at a rendered example here .

Continue reading...


57 / 88