The quote "Once you've ruled out the impossible, whatever remains, however improbable, must be true" is used by Sherlock. A minute later Watson jokingly calls him "Spock." In Star Trek VI: The Undiscovered Country, Spock uses the same line, stating that an ancestor of his used the same quote. If this is true than Sherlock may be related to Spock.
Sherlock knows that Lestrade just returned from holiday because of his tan. In real life, Rupert Graves was tan because he had just returned from Guadeloupe while filming Death in Paradise. His tan was written into the script.
When offered a cup of tea, Sherlock replies that he'd need something stronger - 7% stronger. The original Sherlock Holmes used a 7% solution of cocaine when he didn't have a case and "wanted to stimulate his mind."