on the spur of the moment

From LSJ

πρὸ συντριβῆς ἡγεῖται ὕβριςpride goeth before destruction, pride comes before a fall, pride goes before a fall, pride goeth before a fall, pride wenteth before a fall, pride cometh before a fall, pride comes before the fall

Source