Thanks for the laugh, funniest thing I have seen on here for ages!
As for the dog, I would get him check at the vet for eyesight/hearing problems, he may not be seeing/hearing people going past and it makes him startled. If all is ok, then he needs to be made aware that this is not acceptable behaviour, either by the person being nipped making a short sharp high pitched 'ouch' sound like another dog would do, or else told 'no' in a very firm voice. Make him either go and lie in his bed, or put him in another room for a while, so he realises his actions are not welcome. This must be stopped before it becomes more serious, as a quick nip now could turn into a bite before you realise.