Create rotated or angled tileable patterns

Let's say you have a tileable pattern, for example a checkerboard or a weave pattern. Now you want to make a rotated version of it but still keep it tileable. There is a little bit of geometry that you need to know to keep the tile size of the rotated version reasonable. This tutorial explains how to do this.