I've found that if I'm good at solving the problems that my boss faces and make them look good(and my boss is aware of it); and if I'm friendly and helpful to my coworkers, they are willing to embrace any eccentricities that I have rather than look down on me for them.
Be good at your job, be known to be good at your job, be friendly, be helpful, be respectful. It goes a long way.
A bit of good natured teasing is all fun. As long as you get to tease back on their foibles, it's all good.
If you've got some problem colleagues, this is a GREAT book on how to deal with them:
http://www.amazon.com/Dealing-People-Can%252019t-Revised-Expanded/dp/0071785728/ref=sr_1_1?s=books&ie=UTF8&qid=1371584978&sr=1-1&keywords=how+to+deal+with+people+you+can%27t+standThe info in that book works with friends, spouses, family, coworkers, even fellow inmates. (Yep, I know someone who was in prison who really appreciated the copy I sent him.)
If all the nice person ways don't work, and you choose not to be mistreated or made to look bad by a coworker anymore, pick your time and topic carefully. Then cut them off at the knees while remaining firm, polite, professional and - equally important - absolutely and obviously right.
Bullies don't have the stomach for it once they find out it's going to hurt.
Worked with a guy once that was in charge of the computer hardware and network operations. I was a programmer. He would constantly make stuff up to avoid doing the work that needed to be done. He would always claim it was for "security reasons". He could BS the management above him. I would win each argument but who needs that kind of hassle.
That wasn't enough to make me mad enough to cut him off at the knees.
I found out that he had been having a set of arguments with my direct boss via email. He would reply with made up stuff carefully written to make my boss look bad AND back-copy it to the company president. My boss didn't know this was happening. He would refute the made up garbage each time but those emails weren't going to the president. My boss, who was a good guy and doing a good job, was getting shivved. We found out about it.
THAT was enough to make me mad.
The next time the "security reasons" excuse came up, I called a meeting between him, me and his boss, the CIO. He said his stuff.
I told him, "I'm really tired of having to fight this made up security issue each time I try to do my job. It's wasting the company's time. Let's just hash this all out once and for all."
"The security settings I'm asking to be set up for this application are exactly the same as the last three I've written and you've installed. Why do we have to have this discussion each and every time?"
"And when I send you the source code and the compiled, linked executable code to install, do you recompile and relink the source code to make sure that the executables actually match the source code you're installing?"
He indicated he did not.
"Do you read the source code and check it for security issues? For example, do you check it to see if there is code in there that monitors whether I'm still in the employee directory, and if I'm not, to delete everything on the hard disk that it can? Do you check the financial software code that I've written to make sure I'm not syphoning off some money into a special account, with an email notice to buy a ticket to Rio when the balance is high enough?"
He indicated he did not.
Then I looked at the CIO and asked him, "But if we REALLY, REALLY want to talk about security, ask yourself why I am the ONLY programmer for both the Cash Receipts and Accounts Receivable applications."
The CIO went white as a sheet.
You NEVER, EVER, EVER put the same person in charge of tracking money received for debts and who owes money to you. It's way too easy to pocket the money and make it disappear without a trace - or at least long enough to steal a real bundle. If I had stolen a wad of money and skipped town, he would never have found work as a CIO again.
We didn't have to have that security fight each time after that. And I got someone assigned to help me with my software projects... :)