arthur's blog

Monitoring subversion with monit

In spite of the Orwellian title, this is about monitoring the Subversion revision control system using Monit on a Linux server. I recently set up Monit to monitor services running a server. It's pretty neat - you can tell it what services to listen to, how to decide if they are responsive, and what to do in the event that they're not. I found a bunch of simple config scripts for most of the services I wanted to monitor on their wiki, but couldn't find a cut-and-paste solution for monitoring Subversion, so I wrote my own.

Simplifying backups of SD cards

For our media work with Adapting to Scarcity, we use SD cards to store much of the video and audio footage that we get. As part of our normal workflow, we make a disk image copy of the SD card before erasing it to get more footage. I wrote a really basic shell script to facilitate the process - read on to check it out.

PHP and json_decode() madness: json_decode() incorrectly handling large ints

title=This had me up the walls for a while. For the new Adapting to Scarcity website, I wrote some custom scripts to generate an RSS feed of our Flickr photos and photosets to facilitate automagically populating the website with our latest from Flickr. I've been passing some information in a JSON string, but was getting incorrect results after processing it. Turns out some versions of PHP 5 have a weird issue with the json_decode string improperly handling largest integers. Solution? Stop using integers and turn them into strings.

Automate adding/deleting files from Subversion

title= Serious nerd alert - but if you use Drupal and/or Subversion, you'll likely find this interesting. Lately I've been dealing with a Drupal module called 'dbscripts 'that helps me track changes made in a database with Subversion (SVN). Besides a few moments requiring banging my head against the wall, it's a pretty slick module - before this, keeping track of database changes and making it easy to roll back to a previous version was not something easy to do. But one thing that's been tricky to manage with the module is remembering to add/delete the files it generates/deletes in my Subversion repository. This has had nasty consequences of forgetting to check-in a newly added database table or causing conflicts by regenerating a supposedly deleted database table during a database restore... Shell scripts to the rescue!

Linux to the Rescue! Again! -or- Using GNUpod Fix a Corrupt iTunesDB File

aral sea drying up While trying to get some songs off of a 160GB iPod Classic (to a different computer from the one the iPod is registered with), I somehow managed to corrupt the iTunesDB file. This is a most important file, as it tells the iPod what songs are on it. Normally you can just plug the iPod into the computer it's registered with - when it synchs with iTunes, the iTunesDB file will be restored. In my case, that computer is 1500 miles away. After unsuccessfully trying a bunch of stuff on an OS X machine, I turned to Linux and GNUpod to save the day. Read on to see how it's done.

back in the saddle

aral sea drying upNearly 6 months after snapping my collar bone in half from a mountain bike accident, I got back in the saddle for one of Guadalajara's 'paseo de todos' - a critical mass-esque bike ride through the city's biker unfriendly streets. It was nothing short of epic.

It was a crowning moment that happily coincided with my general sentiments of feeling comfortable, at peace and very happy to be here. After re-reading my second-to-last post, I think I can safely say I'm over the nasty hump of culture shock, although I'm sure it will be an ongoing process. Finally getting two working bikes together, beginning to get a grip on the different ways of doing things and learning to let go has helped push me in the right direction.

AVCHD Workflow with Limited Storage: Thoughts and ... Got any Advice?!

aral sea drying upFirst of all, ***n3rd alert***. This post is technical and jargony - so unless you care about video codecs, video editing, storage, etc, you probably don't want to read this :) But if you know anyone who knows about these things, please pass this on!

I'm facing some technical challenges attempting to shoot a documentary (potentially hundreds of hours of footage) on a camera using the AVCHD codec. The primary issues are storage space and coming up with a decent workflow to handle footage in Final Cut Express 4.2. I've got some thoughts on the matter, but really could use some advice!

mi cabeza revuelta

aral sea drying upIt's been nearly four weeks since we set foot in Guadalajara, Mexico. And it's been a long while since I've felt so confused, inspired, exhausted, excited, embarrassed, tongue-tied, adventurous and reclusive all at the same, prolonged period of time.

After wrapping up our language classes a week and a half ago, moved into our own apartment smack in the middle of Guadalajara and we started working on our project, Adapting to Scarcity, in earnest. We're subletting a sweet apartment from our friend Andrei who's currently off doing field work for his doctorate. The apartment is great (sick roof access!) and aside from the noise, air quality and pace of the area, we're in a sweet spot (tortas within a block or two in every direction, on the bus lines we care about, etc).

It's been awesome to finally get going with the project - but going from the safe, friendly, "oh you speak Spanish so well!" atmosphere of language school to serious multi-hour long meetings in fast, colloquial Spanish has been a bit of a doozy. Straining to understand what's being said around me, it's been hard to find the chutzpa to speak up. I realized that I've let the inability to express myself half as well in Spanish as I can in English be entirely paralyzing. It's been remarkably frustrating and embarrassing (especially the blunders...). But honestly, everyone we've met so far (especially the folks we're working with) are incredible - brilliant, funny, charismatic and incredibly warm. They make it easier for me to try and get over embarrassed timidity.

Water Scarcity 101

aral sea drying upThis post was written in honor of Blog Action Day.

Water is a ubiquitous chemical substance that is composed of hydrogen and oxygen and is essential for all known forms of life. (In case you didn't already know - and thanks Wikipedia.) We all know that you cannot survive without access to clean water. Yet as watersheds around the world become dangerously polluted and bodies of water dry up due to climate change and misuse, our most precious resource is becoming increasingly scarce.

Bees Swarm in Sendoff Salute, Mexico Heads to the World Cup

bees in the goal box.  shamelessly borrowed from AFPSarah and I caught the World Cup qualifying game between Mexico and El Salvador yesterday. We watched with a bucket full of cervezas in front of us at a local bar near our language school in downtown Guadalajara. After snagging a prime table and settling in for some pre-gaming, we watched as the match opened in a rather unusual fashion - a colony of bees had built a nest in one of the goals in Estadio Ateca. The refs paused gameplay while they frantically attempted to eradicate the bees with what looked like fire extinguishers (see attached photo and Youtube clip below). For nearly nine minutes, we watched as the bees, displaced from their home, swarmed through the stadium looking for a new place to live.