Category Archives: Uncategorized

/etc/udev/rules.d/70-persistent-net.rules

Doing a lot of manual network configuration on your laptop? Do yourself a favor and make this tiny entry to save time looking up what those crazy interfaces might be called.

SUBSYSTEM=="net",DRIVERS=="?*",ATTR{address}=="01:23:45:67:89:ab",NAME="eth0"
SUBSYSTEM=="net",DRIVERS=="?*",ATTR{address}=="cd:ef:01:23:45:67",NAME="wlan0"
SUBSYSTEM=="net",DRIVERS=="?*",ATTR{address}=="89:ab:cd:ef:01:23",NAME="wwan0"

Slightly securing WordPress with shared SSL

Really short version, edit your wp-config.php;

define('FORCE_SSL_ADMIN', true);
define('WP_HOME',        'http://www.blog-url.com');
define('WP_SITEURL',     'https://secure.host-url.com/~account/wordpress');
define('WP_CONTENT_URL', 'http://www.blog-url.com/wp-content');

This should allow your site to have it’s own address, yet enable secure login via a shared ssl.

The longer version, I really don’t care to explain, but if you break something whilst changing the “WordPress Address (URL)” (WP_SITEURL) and “Site Address (URL)” (WP_HOME) in Settings->General, you’re in a world of pain. Easiest form of recovery is by overriding the values in wp-config.php.

Again, I just want to make a point of “Site Address” uses the WP_HOME variable, “WordPress Address” uses the WP_SITEURL variable. I believe this naming is counter-intuitive, because I actually spent time figuring it out.

ProLiant Microserver raid10

DSC_0031s

When you raid10 breaks, and it will… There doesn’t seem to be a simple solution to fix it in the ROM. Infact I’m pretty sure there’s none at all. When you boot into linux, it’ll probably terminate early and drop you into initramfs, where you could probably spend a couple of hours scratching your head, wondering how you’ll work it out using the dmraid tool, again only to conclude that this tool does jack shit.

The solution to your problem seems remarkably simple however. RAID10 is just two raid1 volumes, striped. In other words, {sda,sdb} is one raid1 set, {sdc,sdd} is your other. In my case sdc broke, and I simply powered down, swapped the disk, powered up, and from initramfs, figured fuck it, let’s just clone the working drive.

dd if=/dev/sdd of=/dev/sdc bs=4096

Initialized the raid10, dmraid -ay; exit and the whole thing resumed booting.