Every so often I find myself needing a working example of basic circle-line collision detection. I keep this here so that I always know I have at least one guaranteed example I can look at.
Circle-Line Collision
2D collision detection in JavaScript.