[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

Buffy season 4

Filed under: General — Thomas @ 23:06

2007-06-24
23:06

Pure comedy gold when Spike tries to bite Willow but fails, and a blindingly obvious sexually laden conversation follows, driven to its natural climax.  Someone said season 4 is the worst of them all, but even if that would be true, it's still heaps of goodful.

Summer in the city

Filed under: General — Thomas @ 01:04

2007-06-20
01:04

Summer has hit in all its sticky sweaty glory.  This is my least favourite part of Barcelona - the summer months.  It's doubly bad because my most favourite season - spring - was basically non-existent - it was either rainy like hell or overly hot.  Too bad.

Now it's going to take a good two weeks of insomnia to adjust to the heat, and then holding on until August when a deadly calm hits the working part of the city.   There's still tourists - mostly the ones that are crazy or ignorant about the temperature - but most real people flee the city.  Here's hoping I can get stuff done while customers go quiet for a while.

I left work rather late and got hit by the wet summer heat, sprinkling droplets of sea salt all over my arms and legs.  I swung by Ciudad Condal on the way back from work - comfort food, always works - and I arrived with a thin film covering my body.  I probably stunk the place up but I don't care, Ciudad Condal is my hangout you tourists.

I will be happy to see Kristien tomorrow night and I hope we can still have our day off together on Thursday.  Time together is in short supply as it is, given her irregular schedule and her face on TV.

Friday we're having a little ex-work get-together, the people from 4FM meeting up at a bar.  It's going to be fun seeing those people back - the ones that deserted me, the ones that I deserted, and my bosses from before who sold the company at the wrong time and missed out.  It'll be a night filled with fun war stories.  It's so much easier to look back with fondness when time has put distance between me and the memories.

Bloglines

Filed under: General — Thomas @ 23:29

2007-06-18
23:29

I started noticing some of my Bloglines feeds not updating. In particular, my Penny Arcade and Dinosaur Comics ones were definitely over a month stale. So I thought, "what the heck, let's try the contact link and ask what's up."

The mail I got when opening a ticket had this in it:

Thank you for allowing us to be of service to you.

It is on a line on its own, there is no irony around it, and it is so sharp and pointily effective that I have no choice but to take this at face value, instead of writing it off as cheesy American service.

This line made me do two things:

  • Make the best, clearest possible bug report that I could, instead of a half-assed "I can't figure out what the URL is that breaks because your web interface doesn't make it easy" - instead I went digging around until I found a link to export to .opml then scan through that .opml file
  • When I realized that I could in fact export my subscriptions and thus possibly switch to another service, I thought "Man, these guys care, so I am going to stick with them."

We should hire the guy who wrote this template for our support team. We've had two incidents over the past week that could have been handled better :)

deleting backups

Filed under: General — Thomas @ 13:58

2007-06-11
13:58

backups are good.

Over the years I've come to realize this simple mantra, to the point of thinking, every time I put in place a new service - "how do we back this up ?"

Usually the answer is relatively simple. You svndump an svn repository then tar/bzip2 it. You dump a trac setup and tar/bzip2 it along with the config files. You rsync over maildirs (not entirely correct but good enough). You add this as a daily cron job. And so on.

This isn't perfect, though. Sooner or later you will have to deal with the swaths of disk space your backups are wasting. And really, do you still need the svn dump from two years ago on Monday if you also have Sunday and Tuesday ?

So really, what you want is something more like "only keep the daily backups for three months, and after that only keep a weekly backup, or one every x days".

I searched for ages among various find-like tools to make this possible from a shell script, and never found anything useful. Two weeks ago I decided I'd just write it in python, and it turns out it's a lot simpler than I was fearing it would be:


#!/usr/bin/python

import glob
import stat
import os
import time

files = glob.glob('*')

for file in files:
keep = False

s = os.stat(file)
mtime = s[8]

# keep if it is from a sunday
anyGivenSunday = time.mktime((2007, 5, 6, 0, 0, 0, 0, 0, 0))
secondsPerDay = 24 * 60 * 60
if (mtime - anyGivenSunday) % (7 * secondsPerDay) < secondsPerDay:
keep = True

# keep if it is younger than 3 months
now = time.time()
if now - mtime < 90 * secondsPerDay:
keep = True
print file, mtime, keep

This script prints out one line per file from the current directory, with True in it if the file should be kept.
So typically I run this as

keep-sundays | grep False | cut -d' ' -f 1

to see the list, and then add "xargs rm" if the list makes sense.

Next step would probably be to refine this a little, add some arguments, and put in a cron job, but for now it solves the problem of weeding out my backups and free some disk space on our servers after 3 years of backups.

kill kill kill

Filed under: General — Thomas @ 14:07

2007-06-08
14:07

Every two times you open the box, Schrödinger kills a kitten.

Congratulations to Dave and Christian to getting a bitstream-stable release out !

« Previous PageNext Page »
picture