Star Trek and The Andy Griffith Show were sometimes filmed on the same lot. Specifically, the episodes “Miri” and “City on the Edge of Forever” used the lot that was also used to represent the town of Mayberry.
This post led me to The Andy Griffith Show Rerun Watchers Club. If you follow the link, don't miss Postcards from Goober. (Goober says "Hey!") and the lost episodes fan fiction section. I Like "Ernest T. Bass on Easy Street" by David Kerley