Term: asspull
Example: they were completely screwed, but then there was an asspull and they knew how to save the day
Definition: to pull a solution out of one's ass