When a guy makes a shitty, offensive 'joke' and expects you to laugh ask him to explain what's so funny. Keep asking him to explain the humor.
I've shut down so many fuckasses doing that. First they get defensive, then they become dismissive. After that they make accusations that I have no sense of humor, then the reality hits them that they're not actually funny and then they go away.