Out of the blue, but this one's for Rija, who was always curious:
The gas that makes farts stink is hydrogen sulfide. This gas contains sulfur, which causes farts to have a smelly odor. The more sulfur-rich your diet, the more your farts will stink. Some of the foods that cause really smelly farts are beans, cabbage, cheese, soda, and eggs.