Tech Stuff

false

Here's a recipe for encrypting an external drive with Mac OS X FileVault, and then creating an emergency bootable backup using SuperDuper.

You'll need an external drive - ideally USB 3 or Thunderbolt, if you're going to boot from it. I'm using the 1TB Buffalo Ministation

Start Disk Utility, and partition the drive as shown below. I chose to create two equal size partions using the Partition Layout options. Make sure that the first partition is at least the same size or larger than your internal MacBook or iMac drive. You must format the drive as Mac OS Extended (Journaled), and from the Options button - you must choose GUID partition types.

Read more 
Category: 
11
Aug
2013

The Mouse That Called Home

Razor Orochi
My Razor Orochi mouse - at least I think it's mine.

In the photo included in this post, you can see my new Razor Orochi mouse. It's a pretty cool mouse, but I confess, I'm not entirely sure if it actually belongs to me - or at least which 'parts' of the mouse belong to me.

In the photo you can see that there's a light in the mouse-wheel. It's on at the moment, but to turn it on, I had to first download the Razor Synapse software, register with the company that made the mouse [Razor], 'log in' and then change the settings of the mouse so that the light is on.

I wasn't impressed. Nor were a lot of other people as you can see here, and here. Razer Creative Director Min-Liang Tan attempted to respond to the criticism in a Facebook post. Sorry Mr Min-Lian Tan, but I'm calling bullshit. The 'opportunity' for Razar wasn't about giving gamers an online profile and cloud-based settings. It was about the incredibly useful data that they're able to collect for the retail sales of their products on a global scale. It's the kind of information marketing and sales execs would die for. 

Read more 
Category: 

I've been hacking on Drupal recently and so far, I like it a lot. I've also been reading a little about Drupal's deployment story, and decided that it might be fun to use Capistrano to deploy the projects I'm working on.

Turns out I'm not the only one that's thought of it. Kim Pepper's approach is excellent, and he's included his Capistrano tasks on Github.

Here's my take, which is a little different from Kim's in so far as I am not that concerned about the 'Rail-isms' that come with the default Capistrano gem (for the moment at least).

Read more 
Category: 

Here's a recipe for adding (and formatting) captions to images in Drupal using Entity View Modes, File Entity, and Media 2.0

Design Goals

The objective is to allow a user to upload or select an image using the Media module, as well as choose a layout for the image. The media embed tags (non-HTML) placed into the body of the node/post will then be filtered by the media module, resulting in markup containing an image, surrounded by div elements with appropriate class attributes for position and styling. jQuery, or client-side JavaScript will not be required, and there will be a dedicated caption field. No other specialised 'captioning' or image modules will be required.

Requirements

You'll need all three of the above modules at their latest releases: Entity View Modes, File Entity, and Media 2.0

Read more 
Category: 
18
Jan
2013

WordPress Bash Upgrade Script

Bash Script

Bash is fun. I mean it's a little weird, but it's fun. I've been reading the Linux Command Line and Shell Scripting Bible which I highly recommend. I also wanted a script I could use to update the multiple WordPress installations I'm now hosting.

I found Liz Quilty's handy WordPress mass update script 3.4.1, but wanted to refactor the script to use functions, curl, and tar (as well as remove support for WordPress MU)

And so here it is, one of a handful of Bash script exercises I've completed to-date. Enjoy, and thanks Liz for the head start.

First, a machine specific configuration file (read the warning in the comments section of the script below). Place the config file next to the script file; that is, place wp-upgrade.conf in the same directory as wp-upgrade.sh.

Read more 
Category: 
Tags: 
11
Dec
2012

A UDP Flood Story

I recently suffered a UDP flood attack on my little virtual private server (VPS), and thought I'd describe the steps I went through to discover and fix the problem.

Symptoms

Periodically, my server would stall and become unresponsive. It was effectively dead, although not down. These 'stalling' events would last from 5-20 minutes, and then the server would come back up. Looking at my Munin charts told me that my public ethernet interface (eth0) was being flooded. Here's a particularly bad day:

eth0

And this was after I had rate limited eth0 to 2mbits/sec using tc (more on tc in a bit). CPU usage and interrupts for eth0 also spiked. So something was flooding eth0, and stalling the server.

Read more 
Category: 
Tags: 

It's Androids turn this time. Here's a list of must-have Android Apps for my Jelly Bean update:

1) It bugs the hell out of me that there isn't a decent and simple note taking app in Android. ColorNote makes up for it fine. ColorNote

2) The default Google Calendar also drives me nuts. I want a month view, with at least a few character preview for each item and a list below the month. Jorte is perfect for month and week views with gestures that make sense - although the data entry is a little ugly. Jorte Update: I actually tried Business Calendar before Jorte and for some reason my first attempt didn't stick. I've since tried it a few more times and I'm liking it a lot. Business Calendar.

Read more 
Category: 
Tags: 

An Old Safe - by ed

Earlier this year I was fortunate enough to lead a study that examined the challenges faced by media organizations in managing digital content - in particular digital archives.

The digital-revolution has brought many advantages to media organizations and content producers, but managing file-based workflows, and in particular digital archives - has proved difficult for smaller organizations.

As part of the study, I visited nine media organizations across Nepal, Sri Lanka, Malaysia, and Thailand. The executive summary of the report I produced on behalf of Internews can be read after the break (follow the 'Read more' link).

The complete report can be viewed online here at the Internews Web site. Special thanks to Susanne Weigand. Sue's literary genius transformed my choppy writing  into the smooth and very readable document that's here now.

Read more 
Category: 
Tags: 

XML with Nokogiri Here's a short post on getting started with Nokogiri - a Ruby gem that wraps libxml.

I'm writing this because well, the docs at Nokogiri kind of suck.

I wanted to read a simple XML document. My XPath fu was a little rusty, although all I wanted to do was read some attributes from a root element, some element values off of the root, and then a short collection of items (very similar to an Atom document).

My main bone of contention with the Nokogiri docs was their use of the @doc.xpath("//character") search operator at the very beginning of their parsing tutorial.

How about we start from the beginning:

Read more 
Category: 
Tags: 

Here's a solution to a problem I was trying to solve in Ruby. I wanted to create a 23 bit data structure, that would hold three values. A 14 bit year, a 4 bit month and a 5 bit day. Each of these bit sizes are the minimum number of bits required to support a maximum value of 9999 for years, 12 for months and 31 for days (with months and days optional - hence the custom data structure). Using the bitwise & operator, you can either mask (protect) or zero out bit values. And then using the bitwise | operator - you can turn bits back on. In Ruby you can create and manipulate binary literals directly using the 0b prefix.

Read more 
Category: 
Tags: 

Pages