first two posts on useful js snippets