臨時抱佛腳

Idiom

 * 1) to do something hurriedly only at the last minute; to make a last-minute effort, especially studying for examinations