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