Made it by the skin of my teeth

1. Completed a task or assignment with no time to spare.