I used a pattern called Pumpkin Spice (available for download on the right sidebar here). Once I got to the buttonholes, whatever I did didn't look right, so I found this video on YouTube. The girl in the video actually knits the very same pattern, so you can see how to do it and follow along. She has the most helpful knitting videos I've found so far.
For the green one, I used a cotton yarn and followed the pattern exactly. Then I noticed that it was kind of a tight fit or didn't fit on some mugs. I checked other people's comments on Ravelry and found that they also had the same issue, so they did an extra cable or two to lengthen it. So, on the orange one, I added an extra cable. The orange one is acrylic yarn, so it's also a bit stretchier than the green one. They're kind of like two sizes, so hopefully with the two buttonholes on each and two lengths, they'll fit almost any cup or mug.
I gave these to my coffee-addicted BFF (Alexis) for Christmas, so I'm thinking they'll get a lot of use!