Walking my little dog past a yard and there were 2 big dogs, one of the a GS or at least a mix. I think this home has an electronic fence as I've seen the dogs in the front yard off leash several times with no humans in sight. One of the dogs just barked and stayed at the edge of the yard but the other broke the electronic barrier or his training or whatever usually keeps him on the yard and came for my dog. Luckily I had time to get the spray out of my pocket and give it a face full.
Very satisfying to see it turn tail and start trying to wipe the pepper out of its eyes on the grass.