During the final scene, Barney walks into the bar and is teased about the 'Swarley' name. He storms out, and we hear the Cheers theme, "Where Everybody Knows Your Name". To further honor that classic sitcom, the ending credits are presented in the same font as that on Cheers.
The opening lines of the episode where the guys conclude 'hanging out at a coffee place, not nearly as much fun hanging out a bar' is in reference to Friends, where the six characters constantly hang out at a coffee shop
When Barney and Ted are at the bar meeting Chloe "Crazy Eyes" (Morena Baccarin) for the first time, Taran Killam (SNL) is in the background. He previously and later in the series portrays Gary Blauman, one of Barney's work associates. He is also the real life husband of Colbie Smulders who portrays Robin Scherbatsky.
Tom Lenk (Scott at the coffee shop) portrayed Andrew Wells/Cyrus in Buffy the Vampire Slayer in which Alyson Hannigan portrayed Willow Rosenberg
At the beginning of the episode, the guys were hanging out at a coffee house that was set up the same way as the coffee house in the smash hit comedy Friends.