At some point in my life, I came to the realization that when someone makes me feel "bad", they make everyone feel bad. In other words, that person has a habit of interaction that is highly antisocial and the offending behavior is theirs. In a way, I'm just not that special to that person and am joining a host of others that that person has offended. Even if the latter statement is not true, perceiving it as true, frees the mind, allowing me to evaluate the input, based on its source, for truth.
Another technique I use when another infers that I should know a thing, is to tell them; "my mother never taught me that". This statement, including its humor, deflects attention away from self, freeing mental resources to evaluate and provide additional response if necessary.
Another technique to handle the trivia intellect is to immediately answer; "that is a useful fact". The tone of voice in the delivery is mine to play with; follow with a quick laugh for best effect. Most trivia intellects, who are just that, will take the hint that the trivia is at best interesting and realize that you are on to them.
Two other intellect types that abuse... The first is the person gifted in a single area such as vocabulary and spelling. These especially annoy me in they gain personal value from the reward of using their single mode gift to give the appearance of intellect. I generally take these aside and communicate honor to them for their gift, and explain that they are using their gift, simply because they can. Most often this resets the value of their gift to trivia; allowing them to know that you know their gift has no real purpose.
The second intellect type that is prone to abuse is what I call the dysfunctional intellect. This is a person who indeed has the gift, but in childhood had to use that gift as a sword to defend themselves against brothers and sisters of equal or higher intellect. This type can be brutal and accept direct replies as an invitation to attack. Tough to handle; the best defense here is to shut them up by honoring them.