Warning: the following techniques are not guaranteed to save your life, but they might just might just might possibly maybe save your bacon.
1. The Classic 'Flail and Flee' Technique
A classic for a reason. This involves flailing your arms wildly and screaming 'Ahh! The humanity!' while attempting to make a hasty retreat.
2. The 'Distract and Disorient' Technique
Stare intensely at something, anything, that's not directly in front of you. It'll give you time to gather your wits and make a break for it. Maybe.
3. The 'Calm and Collected' Technique
Stay cool, stay calm, and for the love of all that is sane, do not panic. Unless you're in a zombie apocalypse, then just run.