临阵磨枪

start to prepare at the last moment

lín zhèn mó qiāng ㄌㄧㄣˊ ㄓㄣˋ ㄇㄛˊ ㄑㄧㄤ