dogs....
what i'd do is simple! first, i'd damn sure put some sort of inertial guidance system on the bike, so i could safely engage in grabbing whatever repellant i had at hand while the bike was gliding along; & make sure there was some alarm(aka back-up alarm from SUVs) to preclude you slammin' into somthing whilst you're busy cotrolling the situation. THEN i'd look into the Glock; Beretta; or HK VP70, ALL w/laser sighting device(LSD) & F/A capability. i'd have this properly slung in either a back/fanny pack or mounted close to the handlebars; i tried a basket, ONCE, but believe me, that is definitely NOT the way to go as it created so much drag!! it was close to the drag i suffered when i first started biking, before i got the snug supple jerseys, & started shaving my legs. the uninitiated always laughed at this in the office, 'till they realize every effort has a cumulative effect!! anyway, if you're handy with a hammer(no, not THAT kind)you can always pound(OOOoohhh)out a small fairing to mount on the bars that could conceal a shelf inside w/velcro to secure the goodies. w/all that aside, what i'd look for was a good day, when doggie's likely to be out....
that day i'd be prepared, so that once i got near dog zero the auto-pilot(AP) had been tested that day, & i was ready for any occurrance. now, when the dog comes out, do NOT stop, slow down, or try to confront it under any circumstances, as speed & manueverability are the only asset you have at the moment, particularly when going uphill.
as you look into the dog's eye, you'll learn after a while the master's ability to probe the depths of any animals intentions. if you ascertain that nothing, short of the "final option" would be effective here, its definately the moment for serious action. when you deploy your modern Velo-Dog equipment, it must be done w/out any unnecessary flourishes, as these may be caught on some neighbor's kiddy-cam that happens to be pointed your way.
the next move is what I would do under the circumstances. get the dog close enough so you can see into its eyes plainly; if the moment of truth is nigh, i usually give them an humane 3-4second burst, depending on the concealability of the magazine or drum(don't laugh, i have a fellow rider who carefully conceals a Suomi 70rd 9mil drum under the safari vest offered by Snug-Fit Wear of Redundo Beach!! 'course its made of 70% Brazilian Tarantula web to give the utmost in flexibility. wish i could afford it!!
anyway, once i loosed that blast, i'd just get outta Dodge & blaze on up the hill. what are the cops gonna do when they finally get out of the doughnut(dognut?) shop. they'll most likely know it was you, anyway, & know it was justified. i've had 'em say to me, " if it was anybody BUT you, i'da hunted 'em down. hey, if y'need a reference tell 'em ta look me up on the board here, i'll set 'em straight. we can get Massage-a-Boob from lethal force to go to court for you, too. have a good day.