My LA house has to have a shutoff that automatically kills the main gas line during an earthquake. One must be installed when the house changes hands. No grandfather clause exception allowed.
yes, i'd forgotten about those; we got one installed at our house a couple years ago, iirc at no charge from PG&E. it's definitely better/safer than the per-appliance solutions.
Nowadays everyone has their hot water heater and oven bolted or strapped to the wall. I'm sure there are other useful fire codes California has adopted since then but this one rule will probably prevent more fires in the next big quake than any other.