extracting snippets now

also abstracted some code from diary to common. soon, i may need to
start writing content! ah!