In 740, at the time of the iconoclast emperor Leo the Isaurian, there was a terrible earthquake at Constantinople. Seeing this as God's just punishment for their sins, the people repented and prayed to the Most Holy Theotokos and to St Demetrius to help them. God had mercy on them, and the earthquake stopped.
Troparion - Tone 8
Christ our God, You look the earth and it trembles;
deliver us from the terrible threat of earthquakes;
and through the prayers of the Theotokos, send down upon us
Your abundant mercy and save us.
Kontakion - Tone 6
Deliver us all from upheavals, and from terrible afflictions caused by our sins, O Lord,
and spare Your people people whom You have purchased with Your blood, O Master.
Do not deliver Your city to destruction by terrible earthquakes,
for we know no other God than You;
and to those who cry out You respond:
"I am with you and no one will be against you."