Several of scripts extracted from my personal blog