On 3rd Rock from the Sun, a thoroughly unlikable professor developed a friendship with Dick Solomon simply because of Dick's brutal honesty. When the character died, his will specified that Dick give his eulogy, as honestly as possible, which Dick found very difficult to do without being disrespectful.
A fair portion of B.A.'s dialogue on The A-Team is devoted to insulting Murdock and trying to get him to shut up. Sometimes B.A. actually tries to throttle Murdock. Murdock sometimes takes a break from being a pest in B.A.'s general direction to insult B.A. B.A. actually complains about being saved from a life-threatening injury because getting Murdock's blood might make him like Murdock; Murdock encourages these fears after giving the blood. However, it's clear that they care about each other quite a lot. B.A. really worries about Murdock when Murdock is in trouble, and Murdock really does try well-meaningly to help B.A. learn to deal with airplanes, among other instances of sincerely meant aid. There is even one episode where the B.A./Murdock dynamic seems to flip, so that Murdock is giving B.A. much more grief than he's getting.
B.A. also told off at least one person outside the A-Team who complained that Murdock should shut up, and it was nicely done.
Vinnie and Junior of American Choppers. Even when they are in serious danger of not meeting a deadline on one of their bikes, they are snarking away at each other.
Ray:(leans over and kisses Alex on the cheek) And Alex? If you tell anybody, I'll put itching powder down your knickers for a month. You'll be praying for a dose of the clap just to take the heat away.
Austin & Ally usually get along, but when the situation allows they both fight like a married couple.
On Babylon 5 the relationship between Londo and G'Kar veers back and forth between snarky best friends and serious mortal enemies. It's complicated by the fact that Londo has seen in a vision that G'Kar is the one who will kill him.
Of course we finally learn it's because Londo asks him specifically to kill him so as to save Sheridan, and because he is tired of his miserable life as a Keeper puppet emperor of a devastated Centauri Prime. He didn't plan on retaliating, but the Keeper wakes up and in desperation takes control of Londo. They end up killing each other.
The two Minbari Ranger instructors, Sech Durhan and Sech Turval, in the episode "Learning Curve".
Benson Dubois and Gretchen Kraus on Benson. Also to an extent Clayton Endicott's relationship with everyone else.
Sheldon towards almost everyone on The Big Bang Theory due to being The Friend Nobody Likes, but it's most pronounced in his relationship with Penny. She's the Nebraskian born tough but girly and sweet one, he's the nerdy Insufferable Genius, Manchild that insists everything go his way. They love volleying insults at each other and Penny takes a lot of enjoyment in screwing with him in various ways, most notably messing up his trademark knock. However at the end of the day she's something of a Parental Substitute for him and he regards her as one of his closet friends (which coming from Sheldon means a lot).
Also Sheldon and Leonard have this: Sheldon because Leonard is short, flatulent, and (gasp ) an experimental physicist; Leonard because Sheldon is Sheldon.
Howard and Raj also, usually Howard making comments about India, but Raj gets some zingers back: after having Smokey the Bear explained, Raj mentions a similar cartoon mongoose in India who warned children about cobras. Howard: "You had to be told not to play with poisonous snakes?" Raj: "You had to be told not to burn down the forest?"
Blackadder and Baldrick seem to be this, especially in series 2 and 3, series 2 including Lord Percy as well, often with Blackadder making his normal snarling remarks, with Baldrick and Percy seemingly oblivious to it, however Baldrick does occasionally catch on and follows up with a bit of wit of his own. They are also shown to be quite close friends, although Blackadder would fight against this suggestion fiercely, having saved each others lives on numerous occasions, no matter how small the act, like stopping the Prince Regent killing Baldrick after mistaking him to be an assassin, or Baldrick coming in just at the right moment with a good distraction to stop Blackadder getting seriously hurt or killed (such as giving the Baby-Eating Bishop of Bath and Wells a sleeping potion in place of a glass of alcohol just before he killed Blackadder with a red hot poker up the-
Avon and Vila in Blake's 7. Although Avon will fling insults at most of the crew, his usual target is Vila - who not only counters the attack but will sometimes actually win. They actually seem to enjoy themselves, and sometimes (particularly in seasons 3 and 4) Avon insults Vila quite fondly. Avon also gets rather annoyed when Tarrant bullies Vila in Vila's A Day in the Limelight episode, but their relationship breaks down somewhat after Avon considers throwing Vila out of a spaceship to gain escape velocity.
Sort of Richie and Eddie from Bottom. For two guys who spend pretty much every minute of every day beating each other with forks, hammers, chairs, pianos, fridges, and pretty much anything else they can get their hands on, they certainly do stick by each other through a lot. Although this is more than likely that no one else would be willing or able to put up with one or the other.
Walt and Jesse started as an extreme version of this, particularly in the early seasons; they'd bicker and fight relentlessly, sometimes to the point of physical violence, but would pull out all the stops to rescue the other whenever one of them was in danger. As the show progressed and Walt turned into more of a Villain Protagonist, the relationship turned into something much darker.
Hank Schrader constantly makes jabs about Mexicans; his partner, Steve Gomez (who is Mexican) responds with jokes about Hank's weight - and that's when they don't just insult each other in general. Each would take a bullet for the other in a heartbeat.
Angel and Spike have very strong elements of this throughout their complicated hundred year old shared history. They are constantly fighting, whether it be over the smallest of things to the more serious issues, and are shown to find a lot of delight in watching the other experience (non-serious) injury. Yet by the end of Angel's season 5, it's very clear that they care about each other a lot: They reminisce fondly over some of the better memories from their past, Angel reacts with horror when he watches Spike die (and "sacrifices" himself without thinking when the scene plays out again), a telepathic demon reveals that Spike thinks of Angel as an older brother, and they show mutual respect for each other during their final days. Angel has also been shown to feel a lot of remorse and responsibility for making Spike a worse monster than he would have been without Angelus' influence.
Willow and Anya, with an entire episode in season 5 of Buffy dealing with the matter and Anya serving as a surrogate annoying younger sister.
Also, very famously, Xander and Spike. While the show has its moments where it hints that they don't actually hate each other as much as they like to pretend, this dynamic particularly shines in the comics. There, they are constantly engaging in Snark-to-Snark Combat with each other but have developed a pretty close bromance in the years they've known each other. They're even shown going out for drinks, raising kittens together, confiding in each other about romantic troubles, offering each other advice and generally supporting one another. Xander even stops being a Shipping Torpedo about Buffy and Spike and starts actively encouraging them to get together!
Also, Buffy and Faith were this before Faith's FaceHeel Turn to the dark side. She and Buffy do become closer again at the ends of Season 7 and Season 8 of Buffy after Faith's HeelFace Turn.
As is fitting for the Heterosexual Life-PartnerBeta Couple they are, Esposito and Ryan have this kind of dynamic as well. They'll snark each other to death, but are utterly inseparable.
Detectives Esposito and Ryan and Lanie the medical examiner also count to a lesser degree — all three are perfectly willing to snark on Castle at every opportunity, but it's pretty clear that they think the world of him and he's long since become one of the family.
Stephen Colbert treats everyone this way and it's common practice at the ol' Daily Show. Notably, Stephen has mad Vitriolic love for his Papa Bear, Bill O'Reilly. In real life Colbert did admit that, even though he disagrees with O'Reilly on alot of things, he has a great respect for him and pretty much owes his career to him. O'Reilly has also said he respects Colbert since he's rarely ever mean-spirited about any of his jabs at people.
Unsurprisingly, Jeff on Community has this with many people, but Britta specifically. While they hurl insults at each other constantly, they do have a close friendship, and, at one point sexual relationship
Jean and Dolly in dinnerladies. Jean is constantly calling Dolly stuck-up, and Dolly is constantly calling Jean common, but it's clear they genuinely care about each other.
The First Doctor and Ian are continually griping at each other, being racist towards each other and Malicious Misnaming, but become extremely close. The last time Ian causes the Doctor to lose his temper, it's when he tells the Doctor he wants to return to his own time; the Doctor visibly shakes with rage at the idea he's been broken up with.
The First Doctor and Steven. Steven is always the first to tell the Doctor he's a terrible person and storm out in rage at the first hint of Dirty Business, but he's also utterly devoted to him and defends him with his life.
The Second and Third Doctors have always bickered when meeting each other, but have grudgingly admitted to have admired each other to some extent.
The Doctor (particularly the Third, who spent the most time with UNIT) and The Brigadier. They traded sarcasm near-constantly and often had quite irate arguments with one another (see Doctor Who and the Silurians) but were obviously fond friends.
The Fourth Doctor and K-9 spend a lot of time rowing, though (with K-9 being a robot) it's mostly robot passive-aggression from his side.
It seems like for every time that Adric and Tegan snap at each other, they have a caring moment to make up for it. Notably, whenever Tegan is missing or possibly in trouble, Adric will be the first to insist that they go save her. Not to mention that Tegan is visibly grief-stricken when Adric dies and later tries, unsuccessfully, to persuade the Doctor to go back and save him.
The Sixth Doctor and Peri were supposed to have this dynamic, but the production team ended up taking it too far with the vitriol, ultimately making it seem at times like they were just two people who genuinely couldn't stand each other forced to travel around in time and space with each other. Still, the friendship shone through from time to time, and the serial "The Mysterious Planet" tends to be regarded better than a lot of the Sixth Doctor's TV serials in part because it actually shows the Doctor and Peri meeting the "best friends" part of the trope and enjoying each other's company for a change.
Nine/Ten sort-of had this with Mickey and Jackie, though it took a while to cool off from outright hostility on both sides.
"Utopia": The Doctor and Captain Jack are still great friends, but Jack's new status as a Fact of the timeline makes the Doctor edgy due to how "wrong" it feels to his Bizarre Alien Senses, which Jack doesn't appreciate.
Ten and Donna spend their entire season acting Like an Old Married Couple, and the Doctor outright calls her his best friend. This dynamic has continued whenever Tennant and Tate work together since (and they've done that a lot).
Jack: Just my luck. I crawl through two miles of ventilation shafts, chasing life signs on this thing, and who do I find?! Mickey Mouse! Mickey: You can talk, Captain Cheesecake! [they abruptly laugh and hug] Jack: Good to see you! And that's Beefcake! Mickey:And that's enough hugging.
The Tenth and Eleventh Doctors fall into this category after they resolve their initial hostility towards each other. They continue to snipe at one another (though it's mostly Eleven doing the sniping), but their relationship improves so much that they start Finishing Each Other's Sentences and moving in sync.
The Eleventh Doctor and Rory eventually showed signs of this. The Doctor has now realized it's "always with the Rory" and treats him like a Butt-Monkey sometimes but they're good friends.
In a mini-episode, it's shown that the Doctor trusts Rory to help with repairs to the TARDIS. Yes, he actually trusts Rory enough to let him tinker around with his motor... clearly one of the biggest compliments any man can give to another!
Right in his introduction episode, the Twelfth Doctor and Clara inadvertedly managed to hit each other straight in their comparably-sized egos, and have sort of been stuck in passive-aggressive mode ever since, although with him, it's sort of hard to tell whether the insults are deliberate jabs at her vanity, offhanded grumpyness while he's busy saving the world, or really blotched reassurances. Despite their occasional fallouts, they usually still wind up having plenty of fun together and share a strong, complex bond based on many shared traits and deep gratitude. By Series 9, they've moved into a much closer, soulmates-type relationship that turns out to be far, far too close for healthiness.
The Doctor and Nardole snark and take shots at each other constantly, and its clear just how much fun they have doing it.
Due South: Fraser and Vecchio, although all of the vitriol comes from Vecchio — often, he's venting his frustration at Fraser's unremitting politeness. It seems to be the way Vecchio compensates himself for the hassle of constantly going along with Fraser's do-gooding escapades.
Fraser and Kowalski too. Kowalski treats Fraser far worse than Vecchio ever did.
John Gage and Chet Kelly on Emergency!. Chet is always playing jokes as "The Phantom" on his "pigeon" and driving John-and Roy-nuts. But we see how worried Chet gets when John is hurt in a few eps.
On Everybody Loves Raymond, Robert is usually jealous of Ray's success and resents the fact that Ray is their parent's favorite. Ray thinks Robert overstates the favoritism and whines too much. But if anybody ever else ever really offends one of them, the other brother can be expected to step to defend his brother and give a verbal lashing to the offender.
Aeryn and D'Argo of Farscape are heavy on the vitriol, though they do have their moments.
Every host of Fear the Boot (with the exception of the guest hosts that they don't know personally) is like this. They've admitted on the show that they're even worse to each other off the air.
Frasier and Niles Crane on Frasier, although they're brothers, so it's not as much of an oddity. They snark at and insult each other almost every time they speak, but seem to view it as some form of strange etiquette and assurance of the other's state of mind, with one often complimenting the other's skill with words after a particularly witty jab with a raised cup or knowing grin. If one really impresses the other with an insult, the insultee will go so far as to say "touche".
Also, over the seasons Niles and Roz developed into this after starting out as enemies. In an outstanding instance of Character Development, the insults they threw back and forth in later seasons are exactly like the ones they threw back in season 1, but their delivery and demeanor changed subtly over the years from vicious contempt to good-natured teasing.
Friends: Phoebe with Ross and Chandler, especially in later seasons. But while Ross seems to enjoy their squabbling, Chandler - despite being the Deadpan Snarker - rarely bites back, hinting he's not that comfortable with her remarks.
Robb considers Theon his closest friend, yet most of their interactions consist of debates.
Davos Seaworth with Salladhor Saan:
Davos: Salladhor Saan is an old friend. I've known him for 30 years. I never trusted him.
Jaime becomes this with Brienne eventually. When he makes fun of her looks in Season 4, it comes across more like friendly ribbing, at least coming from Jaime.
Sandor with Thoros. They've clearly known each other a long time (both living in King's Landing and being part of Robert Baratheon's court) and understand each other's quirks, to the extent that when Sandor tries to insult or berate Thoros, he barely reacts. Sandor is clearly upset when Thoros dies, even going so far as to try and comfort Beric, who he has an even more hostile relationship with up to that point.
The only kind of friendships Tyrion likes to cultivate:
With Bronn, and even with Jaime and later with Varys, who at first, he sees as another schemer who could strongarm him for his relationship with Shae. They gradually come to enjoy the competence and company of the other regardless of the circumstances, amicably bickering at every chance. It is clear that Varys has a personal liking for Tyrion and then Varys goes out of his way to help Tyrion despite dressing his help simply as part of his greater love for the Realm, gives the Lannister a new purpose in life and becomes the only man in the world Tyrion trusts, besides Jaime. He later develops this with Jorah, albeit complicated by the latter's hopeless longing for Daenerys.
His bond and dynamic with Daenerys is this as well. She likes Tyrion and listens to his advice and is about the only character who has his number (prevents him from drinking, makes him get to the point, and successfully gets him on the defensive) but alongside this, many of their interactions in Season 7 have a frustrated Daenerys listing his failures, while Tyrion argues for the logic in his advice. However, despite everything, Dany and Tyrion care greatly for one another, with Daenerys warning him not to meet Cersei in private as she is worried for his safety while Tyrion defends Daenerys, recognizing her strong moral convictions and saying she is one of the only people he believes in.
He and Jon Snow developed this bond in Season 1, where he was the only one from Robert Baratheon's contingent who decided to befriend Winterfell's illegitimate son. Tyrion and Jon lapse back into this dynamic during their reunion in Season 7:
Tyrion: The Bastard of Winterfell. Jon: The Dwarf of Casterly Rock.
Rory Gilmore and Paris Geller from Gilmore Girls. Paris started out as Rory's academic rival but slowly grew to be her closest friend during Rory's Yale years, when her relationship with her mother became strained and she didn't return to Stars Hollow as often to see Lane. Paris considers Rory her best friend, and because of her abrasive personality, Rory is probably her only friend.
Rory: You know, it's weird; most of the time I hated you. Paris: Yeah, I really hated you, too. [Both girls hug] [At their Yale graduation] Rory:This is it. Paris: Yeah. We've been drafting off each other since high school, and now its each woman for herself. Who knows when we'll see each other again, right? Rory: Paris, I haven't been able to shake you off all these years. We're gonna be friends for a very long time. Paris: You're gonna do such great things with your life, Rory.
Santana seems to be this way with everyone. Rachel is probably the one who receives most of the vitriol since Santana actually has to be held back by the others from beating the living daylights out of her, but there are a few moments when they compliment one another. Brittany, Santana's true best friend, points out that Santana doesn't really hate Rachel: The Glee Club is like a family. No matter how much they piss one another off, they still love each other.
Mercedes, Rachel, and Kurt also fit into this trope. It's more because Rachel is completely clueless when it comes to how friendships work and because they're all incredibly ambitious divas...which, as Rachel points out, is why they're friends in the first place.
Sue admits that she is Vitriolic Best Buds with Will (Will does bite back on occasions) after he not only calls her out on her rude behavior toward Becky, but runs her sister's funeral, including reading the speech Sue had prepared when she breaks down crying. Other episodes confirm this whenever someone else tries to ruin the Glee Club's chances and Sue jumps in at the last minute to save them. She even once admits that she thinks Will is a great teacher and the Glee Club is good for the kids.
Jim Gordon and Harvey Bullock have this dynamic as opposed to the more antagonistic relationship they have in the comics. Five seconds can't go by without one of them snarking or insulting the other, but mess with one of them at your own peril, because the other can and will kill you.
The Penguin and the Riddler are a Villainous Friendship example. Even when they're not in the middle of a bitter feud over something terrible one did to the other, they spend a lot of their screentime bickering and behaving quite childishly around each other, especially in seasons 4 and 5. This is despite them probably being the most important people in each others' lives, to the point that Oswald takes a grenade for Ed with zero hesitation in the series finale.
Jackson and Rico from Hannah Montana. Constantly trying to one-up each other, they eventually show their softer sides in the final episodes of the series.
Also, Oliver with Miley and Lilly.
On Have I Got News for You, Ian Hislop and Paul Merton often mock and insult each other but are actually good friends. The one time Merton took it too far, quite gratuitously calling Hislop "that little shit", he was mortified and immediately began apologising profusely. By way of contrast, Merton's dislike of the original host, Angus Deayton, was completely genuine, and the banter could turn from amusing sniping to uncomfortable quickly on occasion.
Hawaii Five-0: If Steve McGarrett and Danny Williams aren't constantly snarking at each other, you know that something incredibly serious is going on and even then they only stop when someone is dead or dying.
House's House and Wilson. Greg House, Dr. Jerk to the extreme, is the only person allowed to openly mock James Wilson's serial marriages and chronic neediness. Wilson's no doormat and snipes right back at House.
The end of the season two episode "Safe", a Crowning Moment of Awesome for Wilson, involves them getting fed up with living together and starting a prank war, which Wilson wins by sawing halfway through House's cane so it dumps him on his ass in the middle of the hospital. As Wilson shakes his head and walks away, House actually grins at the cleverness of the prank.
Season 5, episode 6:
House: Did you just invoke your dead girlfriend's name to get me off the trail?... You are my hero.
Really, House is such a bad influence on him.
And then there's the first episode of season 4, where Wilson attempts to blackmail House into hiring a new team by stealing (and vandalizing) House's guitar. Definitely a bad influence.
And then Wilson gets cancer and decides to try out selfishness for himself for a change... telling House that he can either accompany him on his road trip to Ohio willingly, or Wilson will drug and kidnap him. Oh, and remember that this is while House is a parolee and cannot legally leave the state of New Jersey. Naturally, House comes along, snarking at Wilson and his attempt to develop a new personality most of the way there.
The five main characters of How I Met Your Mother are like this: they're constantly giving each other trash-talk that's actually far more good-natured and non-personal than most "snarky" conversations in just about every other sitcom. Their insults can be quite brutal, but they're almost never truly mean-spirited. If someone does put a toe out of line in their teasing of another, the other characters are guaranteed to smack him/her down with a Dude, Not Funny!.
Joe, Sal, Q, and Murr from Impractical Jokers. The four of them have been friends since high school, but the shit they're willing to put each other through has to be seen to be believed.
Law & Order: Special Victims Unit has Detectives John Munch and Odafin Tutuola. The two have vastly different ways of thinking when it comes to crime and politics, but are willing to take a bullet for the other.
Kipp and Lydia on Less Than Perfect vary between mean/indifferent to each other and openly admitting that the other is the only person each likes to be around.
Leverage: Hardison and Eliot. While Eliot is usually the more vitriolic - to the extent that "Dammit, Hardison!" is a common Catchphrase of the character - you should not mistake his constant ragging on Hardison as permission for you to do the same. During The Office Job the pair are having a running debate as to whether Hardison stole Eliot's sandwich and Eliot is pissed with Hardison for most of the episode until someone tries to throw Hardison off the roof.
Eliot: Nobody throws Hardison off a roof. Except maybe me.
Eddie Booth and Bill Reynolds, the protagonists of Love Thy Neighbour, develop over the course of seven series/seasons of vitriolic mutual abuse into something like this. But they'd both deny it even under the severest torture.
Malcolm and Stevie in Malcolm in the Middle. In one episode, Malcolm confesses to his father that he is afraid to visit Stevie in the hospital because a large part of their friendship is the fact that Malcolm always treated Stevie like a regular person and never talked about his many illnesses or made Stevie feel like Malcolm felt sorry for him, and seeing him in the hospital would be too painful. When he finally does go to visit him, he responds by making several sarcastic remarks at Stevie, claiming that he never felt sorry for Stevie all the other times he was in the hospital, and irritably throwing Stevie a cookie from across the room before stalking out. Stevie is delighted.
M*A*S*H: Charles is this with Hawkeye and BJ (who are regular best buds). They snipe at and act like they don't like one another, but — on top of working together and sharing living quarters — the three voluntarily spend a great deal of their free time together.
On Martin, the title character and Gina's best friend Pam are constantly at each other's throats, but Gina doesn't mind because they have both separately confided in her that they think the other is OK, though they'd kill her if she actually said anything.
The Mighty Boosh. This is pretty much the gag with Vince Noir and Howard Moon. They spend twenty minutes bragging to and insulting each other, being nasty, inconsiderate, and down right cruel. Howard acts like he hates Vince, and Vince acts like Howard is a loser. But when one sees the other is really in need, they start acting like real friends.
Monk Stottlemeyer has this kind of relationship with a couple of old high school buddies in one episode. It takes Monk quite a while to fully understand the concept.
Tom and Crow have this dynamic on Mystery Science Theater 3000. They'll rib each other over basically anything and have wicked tongues, but also regularly play together, collaborate on snark and songs, and generally act like family.
MythBusters: Jamie and Adam aren't friends, but come very close whenever a more dangerous stunt is on the schedule. Don't believe it? Watch this clip from "Underwater Car"... but don't watch Adam (playing the trapped driver), watch in-car safety diver Jamie. Video here.
Adam has gone on record saying he and Jamie don't like each other and "annoy the crap out of each other every day ... [but they] have a tremendous amount of respect for each other."
Depending on the Writer, the friendship between Tony and McGee can fall into either category. This relationship has evolved over time, too. At first it was mostly Tony insulting McGee, although as McGee has grown more confident he now throws a few back at Tony.
Gibbs seems to have had a similar relationship with his mentor, Mike Franks. Right down to Franks referring to Gibbs as "Probie".
Gibbs also has this relationship with his FBI counterpart, Tobias Fornell. Even after Gibbs shot Fornell in the ass (It Makes Sense in Context), they still look out for and help each other, with Gibbs being the Honorary Uncle to Fornell's daughter.
David and Colby of NUMB3RS are a mild version. They trade a lot of snark and tend to tease each other, but most of the time it's all in good fun and they both know they have each other's backs if anything turns serious.
Felix and Oscar definitely came across this way in the TV version of The Odd Couple, much more so than in the movie or theatrical play versions.
Eventually established in The Office (US), though Jim has always pranked Dwight, and Dwight has always insulted Jim, the two are actually great friends. Jim saves Dwight from being fired despite Dwight thinking it's a trick and in the finale Dwight asks Jim to be his best man.
Michael Wilbon and Tony Kornheiser of Pardon the Interruption are like this both on and off screen. The main difference, according to Kornheiser on his radio show, is that when they're not on camera, there's a lot more profanity.
The two protagonists of Peep Show, Mark and Jeremy, pretty much embody this. Mark is a frustrated, white-collar Jaded Washout while Jez is a jobless Small Name, Big EgoDreadful Musician. Their conflicting views on just about everything (Mark's attitude is worn-down world weariness, Jeremy's is pretentious pseudo-artsy ignorance of how the world works on any level, with a dose of sociopathy) fuel a lot of their interactions. Occasionally, one will reference their presumably much happier friendship in university as "The El Dude Brothers", but this is usually just for guilt-tripping. Still, even on a Sadist Show like Peep Show they pull through for each other sometimes.
Person of Interest: Mr. Finch and Root start out as enemies, but by the time Season Four begins, their relationship evolves to grudging respect and eventually to a more genuine yet still prickly closeness with hints of this trope.
Political Animals: Secretary of State Elaine Barrish and reporter Susan Berg seem to be moving in this direction. They lie to/conceal from/regularly betray each other, but at the end of the day still cautiously extend olive branches of trust and friendship to each other.
Reba and Barbra-Jean in Reba. Usually Reba's the one firing off insults.
Lister and Rimmer from Red Dwarf. They both loathe each other, yet sleep in the same quarters despite having the run of the entire ship, and have saved each others lives on countless occasions whilst always claiming to wish the other dead if only saving them wasn't in their own interests. Hell, in one episode shortly after Rimmer leaves, Lister dreams about Rimmer returning, and they make out.
This is everybody's relathionship with Rimmer. The Cat at times seems to hate Rimmer more than Lister, but hangs out with him a lot, especially if Lister's being humiliated. Kryten constantly stands up to Rimmer, but he's usually the only one who wants to save Rimmer when he's in danger. Kochanski despises Rimmer, but once gave a touching Alternative Character Interpretation about him. Holly is constantly mocked by Rimmer, but still projects him (with the occasional comical haircut).
Amicable Exes Stevie and David love to insult one another, and she tends to cringe at any mention of their previous romantic/sexual relationship but they remain devoted and supportive friends.
Roland and Johnny constantly insult each other, but Roland also often refers to Johnny as his Best Friend. Johnny tends to balk at this but he also cares about Roland and will stick up for him, such as when his snooty former friends are ridiculing the town.
Dr. Cox and J.D. from Scrubs are a variation. No matter how many times Cox tells J.D. he is not his mentor nor is he his friend, J.D. always assumes Cox is kidding around. Of course there is plenty of evidence that Cox is just fooling himself given all the scenes that show that he does care for J.D. (he just refuses to admit it).
Also Dr. Cox and Dr. Kelso. For two people that can't stand each other, they sure have lunch together or hang out in the break room together a lot. After Kelso retires, he and Cox go from this to just secret friends. Eventually everyone finds out, so now they're just good friends.
To a certain extent, Dr. Cox and Elliot. They don't often get along, and Cox frequently ridicules Elliot and questions her competence. However, he also punched Kelso for her and told her she was doing fine, and reminded her that she had to take care of herself as well as her patients.
In "My Finale", Dr. Cox actually admits that J.D. is his friend, and an amazing doctor that cares about his patients just as much as he does... only for J.D. to hear it (he had an intern insult him behind his back on purpose) and promptly hug Dr. Cox. The intern has yet to be punished for helping J.D.
All of the key relationships in Seinfeld's World of Snark, with those between Jerry and George, Jerry and Elaine, and George and Elaine deserving special mention.
Charlotte and Samantha on Sex and the City clash often because of their radically different opinions on sex and relationships, Charlotte being much more conservative and traditional, and Samantha being a much more free thinking "Try"-sexual. This came to a front when Samantha had a One Night Stand with Charlotte's separated brother. But in the end it's very clear that the two do value their friendship and love each other dearly.
Sherlock and John certainly argue a lot. Sherlock likes to insult John's intelligence and blog, while John often gets angry at him for his lack of empathy towards others, and occasionally about the severed heads in the fridge.
Sherlock and Lestrade also have this relationship once they reach the point that they are genuine friends. Sherlock still mocks Lestrade to a certain degree (as he does with literally everyone in the entire series), and Lestrade has or has tried to take embarrassing photos or videos of Sherlock on numerous occasions when he's in a state of weakness. Nonetheless, Lestrade is Sherlock's onlyFriend on the Force, and Sherlock trusts him implicitly. In "The Reichenbach Fall", he was one of the three friends that Moriarty planned to execute unless Sherlock committed suicide. Lestrade, in turn, respects and admires Sherlock, nicely summed up through this quote in the first episode.
Sherlock Holmes is a great man, and I think one day, if we're all very lucky, he may even be a good one.
Odo and Quark from Star Trek: Deep Space Nine. Quark is constantly bringing trivial complaints before Odonote Most of which are about Odo himself, or his security officers and Odo keeps Quark under constant surveillance and regularly threatens him with arrest and imprisonment. Yet somehow, whenever Quark is caught red-handed, it's almost always everyone else involved who actually gets arrested, and when Odo is in trouble Quark is the first (and sometimes even only) one to speak up in his defense.
Quark: Nobody knows him like I know him. Let me tell you something, he's an ill-tempered, over-bearing crosspatch. But he was no Cardassian collaborator. And he's no killer. Patron: I can't believe you're defending him, Quark. You're his worst enemy. Quark: Guess that's the closest thing he has in this world to a friend.
Miles O'Brien and Julian Bashir are this as well, albeit typically weighted more towards 'best buds' and less 'vitriolic' than Quark and Odo. When Bashir returns from spending four months in a Dominion prison camp while having been replaced by a Changeling infiltrator, O'Brien comments during their regular darts game that "the Changeling was easier to get along with".
Spock and McCoy from the originalStar Trek. McCoy constantly insults Spock, and Spock's occasional rare outburst of anger or humor is usually a comeback, but they do pull together and worry about one another when danger looms. It would be more even-handed, but Vulcans are too rational to get into open insult exchanges.
Spock does hold his own in said exchanges, though, and usually manages to give as good as he gets — either through Insult Backfire, or more directly (e.g. his ridiculing of Bones's medical competence and his illogical nature, which is surely the gravest insult a Vulcan can think of).
Whenever anyone else (even Kirk!) criticizes, attacks, or insults one of them, the other will always be the first to rise to his defense.
McKay and Sheppard from Stargate Atlantis: they trade barbs, which frustrates Rodney to no end, combine their skills together in nearly every episode to save the day, but in the end, they are best buds they take turns saving each other, and despite massive blows to their friendship they continue to have an unbreakable bond.
They've also bonded since the second episode of the first season, showing that their friendship was meant to last.
It should be rather telling that Rodney's testing of a personal force field involved Sheppard throwing him off of a balcony, then explaining, with ridiculously large grins on their faces, that it wasn't the first test they tried;
Sheppard: I shot him!
McKay and Beckett also qualify for this trope. On the one hand, Beckett knows that Rodney isn't kidding around when he insults medicine and everything else, but he brushes them off and sees past McKay's exterior to his heart of gold (also almost immediately) to the extent that they become best friends which at the end of Season Three culminates in after Beckett's "death" which many fans also considered the series' hardest hitting Tear Jerker.
James May: Were good mates because it just wouldnt work otherwise. But we also quite enjoy hating each other. If Jeremy [Clarkson] was drowning, I probably would go and pull him out. Eventually. But only after laughing for a bit and making him think I wasnt going to.
Benji and Lewis Caine came across as this in Underbelly. They would rag on each other, tear into each other over who actually killed someone on a hit they were on, but when Benji died it hit Lewis hard.
Jade and Cat from Victorious, almost to the point of being "friends in name only". Cat will share a thought or suggest an activity to Jade, Jade will make a snarky statement or even a death threat. Cat will happily laugh it off, only for Jade to say "I'm serious" in a completely serious tone. Cat then laughs for a couple more seconds before all the joy disappears from her face. This has happened NUMEROUS times.
CJ and Toby on The West Wing, (as CJ was the only one who didn't tiptoe around Toby's Hair-Trigger Temper and Toby the only one who dared to boss CJ around), often engaging in passive-aggressive word wars all episode only to drop them in a heartbeat in favor of quiet support and appreciation when a problem took a turn for the worse.
The American version of Whose Line Is It Anyway? shows us a lot of this. Entire hoedowns have been composed out of insults and belittling each other's manhoods, yet they seem to get along just fine. (And, of course, Drew Carey did apologise when he felt he crossed the line out of this trope and into simple abuse).
Amiable shit-talking is pretty commonplace on The Wire, be it coming from the police, the gangsters, the unions, the journalists, the politicians... hell, even the school kids are constantly making cracks.
Alex and Harper. Alex and Justin. Alex spends a good portion of the time insulting or using the people around her and they either don't notice (Alex: Why don't you go start on my homework and I'll make some sandwiches?" Harper: "Oh, you're such a good friend!") or snark back.
Inverted somewhat with Alex and Laritate. They usually don't get along too well and are constantly clashing, however they do have their moments where they get along very well.
The guys from Workaholics are this-they often have each other's backs, but are also capable of being very mean to each other, from destructive pranks to physical violence and more. They usually are all on the same side against outsiders, though.
A mild example on X Company: Neil and Tom butt heads frequently in the first season, as Neil seems to think Tom is too emotional (because of his unwillingness to kill when other options might be available) where Tom finds Neil's nonchalance at killing distasteful. Otherwise though, they are good friends, as can be seen by Neil's response to Tom's death