To grab the Buddha’s foot in an emergency
to grasp the Buddha’s foot in an emergency to seek help at the last moment; 
Literally:
Meaning:
to make a frantic last-minute effort
This comes from a longer phrase which runs:
When idle he neglects to burn incense,
yet when in trouble he desperately clutches the Buddha’s feet.
For example:
惠州学院中文系一老师则认为,考试前临急抱佛脚,对这学生掌握知识没什么好处,不可取。
However, a teacher at the Chinese Language Department of Huizhou College believes that such desperate cramming [=Buddha leg clutching] just before the exams in no way contributes to the students’ understanding of their subjects, and thus is undesirable.
In colloquial use it is more common to say:
临时抱佛脚
lín shí bào fó jiǎo
And this fits better with the whole phrase:
平时不烧香, 临时抱佛脚
píng shí bù shāo xiāng, lín shí bào fó jiǎo
Illustrations by Jason Pym








