On second thought, if this is a dog you will regularly encounter and can get to know, perhaps the hot dog trick is a better way to go. I have no sympathy for the random dog that chases you on your bike having been run off the road by one and nearly killed when I was a kid. I do, however, know from first hand experience that it is a lot of fun to get an otherwise annoying dog to like you. We had a yappy, irritating chihuahua living next door that would bark incessantly when you went outside. Just wouldn't shut up. So, one day I went to the fence with some treats, and before long we got to be buddies. He would give me a quick yap to tell me he was at the fence whenever I went out, and I would give him a quick scratch behind the ears.
Much more enjoyable than gritting your teeth and wishing he would get scooped up by an owl.