Regular Expressions - \z and \Z

I recently discovered that \z and \Z (which match the end of the input) have subtly different behaviour (this is in Ruby but it behaves the same in most languages other than Python for some reason). \Z will allow a trailing newline character whereas \z will not. This is important…

Git grep and gitattributes

Git has a grep ability. It's way faster than grep and ignores stuff in the .git directory that you probably weren't looking for anyway. This git grep command takes a -p argument that shows the method or class the matched lines are in. That's pretty cool. Out of the box…

The accepts_nested_attributes_for Handbook

Rails has accepts_nested_attributes_for which helps when building forms that combine a parent and their related models. Unfortunately, I normally get it wrong and spend far too long tracking down why it isn't working. Hopefully this will help reduce that time in future. Gotchas If you're using update…

Unchecking Trello Cards

I use Trello quite a lot at work and one feature that's always been quite handy is the checklists you can add to cards. Unfortunately, sometimes these lists get quite long and if you ever need to uncheck them all it can take a while. To fix this I wrote…

O Tannenbaum

Today was the day of the Christmas tree. After a trek around town to all the places that weren't selling trees we finally made it to Holy Corner where we purchased a delightful little tree complete with a little log stand. We then hauled the tree home down the hill…

Ghost

So as probably nobody has noticed I've switched over to using Ghost to run my blog. I imported all my old posts because hey, then I have content even if it is really old and largely irrelevant. Unfortunately the URLs don't entirely match up. I'm not really that bothered by…