There are seismic gas shutoff valves that you can install at your gas meter. Internally, it’s a stainless steel ball on a perch. Anything more than about a 4-point quake knocks the ball off and it plugs the line. Resetting it is just as easy. The gas utilities are also on a program of installing similar shutoffs in their lines. The challenge is in restarting service as they don’t want to just turn the gas back on if the main pipe under your street is cracked, so there’s a lot of inspection involved.
I did see that some restaurant groups are suing Berkeley because certain cooking methods can’t be done well with electricity.