The problem is that even with the codes properly, you can not escape past sins. In particular, illegal waste dumps from the 60s, 70s, who just have been bulldozed over and build upon. They lead to liquidification under stress (large buildings or small earth quakes. And even the best up to code building will not withstand stresses outside of the spec (tilt by 30 degrees + shake).
https://en.wikipedia.org/wiki/Liquefaction
Its very scary and in particular near old city borders in the 70s its acute. https://earthquake.usgs.gov/hazards/urban/sfbay/liquefaction...
Preparations: Not alot you can do. Brainstorm and placebos.Lifeslides and ziplines. I dunno. I provide awareness and anlysis. No solutions.