N-, O-, and S-tridoped nanoporous carbons as selective catalysts for oxygen reduction and alcohol oxidation reactions.