Here is what can you do before, during and after an earthquake

According to USA's New Mexico Bureau of Geology & Mineral Resources (a research and service division of the New Mexico Institute of Mining and Technology (NM Tech)), here is what the US Federal Emergency Management Agency (FEMA) suggests:

Before an earthquake occurs
  1. Fasten shelves securely to walls, and place heavy objects on lower shelves.
  2. Store breakable items in low, closed cabinets.
  3. Hang items such as pictures and mirrors away from beds and anywhere people sit.
  4. Brace hanging light fixtures.
  5. Repair known defective electrical wiring and gas connections.
  6. Strap your water heater to studs in the wall and bolt it to the floor.
  7. Repair any large existing cracks in walls or foundations.
  8. Store poisons such as pesticides and herbicides, as well as flammable liquids, on bottoms shelves of latched cabinets.
  9. Identify safe places in each room (under sturdy furniture, against inside walls, away from glass).
  10. Locate safe places outdoors (away from buildings, trees, electrical lines, and bridges).
  11. Teach family members how to turn off gas, electricity, and water.
  12. Teach children how to dial a help line in an emergency.
  13. Have disaster supplies on hand (flashlight and extra batteries, battery operated radio, fist aid kit with manual, emergency food and drinking water, non electric can opener, cash, sturdy shoes).
  14. Develop an emergency communications plan in case family members are separated.
During an earthquake (indoors)
  1. Take cover beneath a sturdy piece of furniture or against an indoor wall away from glass that might break.
  2. Stay inside! The most dangerous thing you can do during an earthquake is to try to leave.
During an earthquake (outdoors)
  1. Move into the open, away from buildings, street lights, and overhead utility wires. Stay there until the shaking stops.
During an earthquake (in a moving vehicle)
  1. Try to find a clear area away from buildings, trees, overpasses, and overhead wires.
  2. Stop quickly and stay in the vehicle.
  3. Once the shaking has stopped, proceed with caution. Bridges and ramps may have been damaged during the shaking.
Dealing with animals
  1. The behavior of animals may change after an earthquake, and they may become aggressive or defensive.
  2. Leash dogs or keep them in a fenced area.
  3. Animals may not be allowed in emergency shelters, so prepare an emergency supply that includes a several day supply of dry animal food and a large water container.
After the earthquake
  1. Be prepared for aftershocks. They may cause additional damage for hours to months after the main shock.
  2. Help injured or trapped persons within the limits of your abilities.
  3. Listen to a battery operated radio or television for emergency information.
  4. Check on the elderly and disabled, or children who may need special help.
  5. Stay out of damaged buildings!
  6. Use the telephone only for emergency calls.
  7. Clean up spilled materials.
  8. Open cabinet and closet doors cautiously.
  9. Inspect chimneys for damage, and be extremely careful when lighting fires in fireplaces. Chimney damage may lead to fires.
  10. Check utilities for damage. If you smell gas, turn off the gas and do not use electrical devices (including telephones). Stay away from broken electrical wires, and turn off the main fuse box or circuit breaker. If water pipes are damaged, do not use the toilet and avoid tap water for drinking. Use your emergency supply, and melt ice cubes for additional water.