At one point I attempted to download a template from the internet, but even when printed on card stock I could not cut the small holes accurately enough to make it work.
Then I ran across this listing on eBay -- Leica M Lens 6 Bit Coder Kit -- http://www.ebay.com/itm/Leica-M-Lens-6-Bit-Coder-Ver-3-0-Kit-M8-M8-2-M9-M9P-M-E-Digital-Cameras-/181046019078?pt=LH_DefaultDomain_0&hash=item2a272f0406#ht_4280wt_1399
For $75 I could supposedly code every lens I owned. I decided it was worth a shot. When it arrived I was not disappointed.
The plastic template snaps onto the M mount making it very easy to use the included marker to color in the spots that should be coded. The D-Coder gives you the best codes to use for Zeiss and Voigtlander lenses. The only downside is that it doesn't list the codes for all Leica lenses. For my 90mm Elmarit and 135mm Elmarit I had to do some googling to find the codes, but it was not hard to procure them.
I coded all seven of my lenses in about ten minutes at a cost of about $11 per lens. You can't beat that.