Tech Stuff

Android Jelly Bean

I've had my Samsung Galaxy Nexus for a little over a year now.

I've received updates from Samsung from Ice Cream Sandwich, to Jelly Bean. However, a recent OTA update for Jelly Bean to Android 4.2.1 left my phone sluggish and frustrating to use.

I'd read some of the reports here, and here, and decided in the end that I was ready for something a little more drastic.

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. A word of warning first. All of the required modules are either unstable or dev releases and so for those not willing to deploy these modules to a production Drupal install - this article should at the least give you an idea of what's possible and what's coming.

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 the following releases: File Entity 7.x-2.0-unstable7 Entity View Modes 7.x-1.0-beta3 Media 7.x-2.x-dev

Read more 
Category: 

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.

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: 
10
Nov
2011

The Long Road Home

I’ve toyed with a few titles for this post, including - ‘My Kingdom for a Backslash’, or ‘Fish Don’t Know They’re in Water’. In the end I felt ‘The Long Road /home’ was the most fitting. This post is about my thoughts and experiences as a software developer, leading up to my use of Linux and building my first non-Microsoft based Web application.

Read more 
Category: 

Pages