For the people who just annoy you or rub you the wrong way, you have to try to see Christ in each of them. Just try to see the good in them. It can be hard, but just trying to see things from their perspective helps. Pray for understanding and compassion. Don't sweat the small stuff. Most people are not trying to be mean to you, they are just not really thinking. Yeah it is a little selfish, but I know there are times when I have been selfish. I try to forgive. Ultimately just treat people the way you want to be treated.
Now there are people who do go out of their way to hurt you. With this kind of person the best thing you can do is just be polite and avoid them when possible. You don't have to make a big deal about it or snub them. Really just treat them like a stranger. You don't have to be overly friendly or even friendly at all, just be polite. These are the people you need to pray for and pray for the wisdom to know what the right thing to do is and the courage to do it.