I've needed this a couple of times. saving it here.