What to do when a snake is in front of you? I was coming out of a corner and saw something on the road about 10 meters up but only from about 5 meters I realised it's a snake trying to cross the path.

I panicked but didn't really do anything. Fortunately, it crossed the past quick enough, I just ended up so annoyed/scared.

What's the best action in that situation? Accelerate as hard as you can, while trying to avoid it? Or aim for it? I was too afraid that if I stopped it might chase me.
Stop. Back up if necessary. Don't risk running over it. Snakes almost never chase people, they will only attack if they're cornered or you're lying very still (for very large snakes that eat things the size of people).

Running over a snake is probably your worst approach if you don't want to get bitten. Not only do you have to be very close to the snake, you're going out of your way to threaten it. Almost any animal in that situation will try to attack you, purely to stop you killing them.

I've seen several snakes, one on my commute route. For me that's a chance to stop and go "Wow! A snake!" and maybe get my camera out so I can take a photo from a safe distance. But even snakes that aren't venomous are best left alone. Either because they're wild animals that you respect and want to encourage, or because the gap between non-venomous and harmless is significant. A bite or accidental impact from a snake can still injure you. 

Also, many are protected, and I'm not sure whether being bitten by a venomous snake is actually worse than being prosecuted for interfering with one.