Are you talking about random people in a bar, or people you know who just are always talking shit?
I had this one guy who was like, friends with my friends, I never particularly talked to him though, and for some unknown reason he just started talking shit to me every time he saw me.
Once I realized that was his only technique, every time I saw him I said "hey what's up shit talker, how's the shit talking treating you today?" or something along those lines, before he could get a chance to spit anything out. After a while he stopped trying.