When discussing Holmes' Moriarty wall, Watson asks what connection there is with Napoleon Bonaparte. This is a reference to the original works by Sir Arthur Conan Doyle, in which Moriarty is described as "The Napoleon of Crime."
On the napkin Holmes retrieves from the rubbish bin after gathering the remains of The Red Team at the police station, it states that he should find a captain, code name Yossarian. Captain Yossarian is of course the name of the main character in Joseph Heller's 1961 classic 'Catch 22'.
First appearance of Clyde the Tortoise.
When Captain Gregson enters the apartment of Walter McClenahan, Detective Bell asks, "How's Pogue and Mahone?" This may be an Irish cop joke, as "póg mo thóin", which is pronounced like "pogue mahone", means "kiss my ---" in Irish Gaelic.
When Sherlock is listing the members of the Red Team, he mentions a "Harold Dresden, Mathemetician." It is quite possible this is a private nod by the writers to the fictitious book character Harry Dresden, Professional Wizard (aka "Magician").