Lightmap/Ambient Occlusion Merging Tutorial

During the recent months, I've been working on improving the look of my lighting. I've discovered a relatively simple way to make a single lightmap texture with standard shading, as well as Ambient Occlusion shading.
For all I know, most of the current writers probably know how to do this already. However, if there are enough people who would like to know how it's done - post here, and I'll make up a tutorial.
Edited: For nomenclature.
For all I know, most of the current writers probably know how to do this already. However, if there are enough people who would like to know how it's done - post here, and I'll make up a tutorial.
Edited: For nomenclature.