A couple of utility scripts (I doubt it's useful for anyone other than me...)