When the storm is coming in, dock your boat anywhere you can. Also, When the bar is closing and all of the good looking girls are leaving, settle with any fat/ugly one.
Bartender: Last call.
Guy: I'll take 1 and a bottom shelf long island ice tea for Bluto.
Guy: Hey, any port in the storm
Sailor Dialect meaning, essentially: when you're in trouble, any way out is a good way out.
Y'see, back when people sailed the seven seas with reckless abandon, a crew was more likely to find the nearest port than to risk ship and crew in a life-threatening storm. This phrase is probably most applicable to the pirate-sorts, as this phrase suggests that anything is better than getting screwed, and pirates liked that sort of shady-around-the-edges shiznit.
Pirate #1: 'Tis cap'n's orders ter drop anchor at the nearest port!
Pirate #2: Aye, any port in the storm, sez i.
Math Student #1: Dude, I may have cheated on that math test, but I stayed up all night watching reruns of Cheers! What else was I supposed to do?
Math Student #2: Hey, any port in the storm.