-
installing Arch Linux ARM in Raspberry Pi
This tutorial guides you through the process of installing the ARM flavour of Arch Linux in a RaspberryPi. This is a headless installation procedure, no monitor/tv or keyboard are required.
-
adjusting HDD spindown with systemd service files
The preferred way to run on-shot commands after boot when using Archlinux + initscripts, is placing them in the
rc.local
file. Also, initscripts provide a handy helper which creates a service file that runs these commands on boot when using systemd. If you want to completely move away from initscripts, to a pure systemd-based system, you need to create service file(s) for these commands. -
migrate disqus comments for jekyll's pretty urls
I recently enabled the pretty-url feature in Jekyll, which removes the redundant
.html
suffix in URLs. You can enable it by addingpermalink: pretty
in your_config.yml
. This of course broke Disqus comments on all existing pages. -
view your public IP from pentadactyl/vimperator
Pentadactyl and vimperator extensions allow you to write handy functions in javascript. These functions can be later called from the command mode or from keybindings.
-
sorting null values last in CakePHP
Assume your data contain a field with some NULL and some not NULL values. If you want to sort your entries against that field in a descending order, NULL is interpreted as 0 and entries with NULL in that field go at the bottom. This is perfectly desirable. But what if you want to sort them into an ascending order? Entries with the NULL field would show up first. In some cases, you might want to sort entries with actual data in that field first, and let the rest show up last.