Language:
Free Online Dictionary|3Dict

临时抱佛脚

Source : CEDICT

lit. to clasp the Buddha's feet when danger arises (idiom); fig. to profess devotion only when in trouble/doing things at the last minute/making a hasty last-minute effort