In Harry Potter, Harry gets into all sorts of scrapes, and never seems to get into trouble, which is normally complained about. This is lampshaded in Harry Potter and the Order of the Phoenix, when Ron comments, after Harry is found innocent at a trial for underage magic, "Gee, Harry. I'd knew you'd be innocent. You never get in trouble."
As the series progresses, Harry spends more time lampshading his own Weirdness Magnet status - and the number of times people tell him he looks like his dad with his mother's eyes.
There's an example in The Grapes of Wrath. When the main character is describing how the Christ Figure, Jim Casy, dies, and how he said, "You guy's don't know what you a doin'!" one of the other characters remarks that he wished Grandma (a VERY Catholic grandmother) could have heard that.
Captain Underpants does this... often. Case in point, when George and Harold have a discussion about how cliche an axe cutting through the ropes instead of its target is, right before the axe headed for them does this. Their only response is saying absolutely nothing more about it. A classic line concerning how unlikely the plots are is "You know, up until now the plot was almost plausible.
Also, Harold and George have often commented on unlikely plot events with lines like "It's like we're in a badly written children's book."
Narrator: You may even have commented on the surprising inappropriateness of such a murderous and bloody scene appearing in a Children's book. It's fun to feel offended, isn't it?
Paarfi of Roundwood, the narrator of the Phoenix Guards trilogy, exists for Brust to hang lampshades on every fantasy trope in existence. Vlad Taltos, who narrates his own stories, is not an author (Paarfi is) and thus spends much less time on lampshading and more on straight jokes.
In the Thursday Next book The Well of Lost Plots, a holesmith in the Bookworld (whose job is to patch up Plot Holes) actually points this out as a new technique.
Llyster: I'm working on a system that hides holes by highlighting them to the reader, that just says, "Ho! I'm a hole, don't think about it!" but it's a little cutting-edge.
So, this book hangs a lampshade on the practice of hanging lampshades? This freaking series...
Not exactly! (Or not necessarily.) This scene satirizes the practice of hanging lampshades—but hanging a lampshade is self-satire. So it only counts as hanging a lampshade if the book itself had previously been hanging lampshades.
Tanya Huff's Smoke and Shadows series (so far, Shadows, Mirrors, and Ashes) features tropes at roughly one-per-page frequency, almost all lampshaded; the protagonist, along with most of his allies, works in television. Making a Vampire Detective Series, no less. Those few tropes that aren't lampshaded tend to be pretty meta already, thus:
"There's six kinds of hell breaking loose and heading this way." "You've been waiting your whole career to say that, haven't you?" Amy asked, snickering. He flashed her a broad smile. "Pretty much, yeah."
Mark E. Roger's Samurai Cat books use this trope so extensively that characters end up commenting on the lampshading itself, with lines like "I'm not comfortable with us noticing symbolism in our own stories".
In the Xanth novel Currant Events, an evil clone of Calliope, Muse of the Future, mocks the real Calliope with insults about the stories she transcribes in her history tomes; insults that mirror real-life accusations critics have thrown at Piers Anthony (who seems to take a "Who cares if you don't like it" approach to criticisms).
Well, let's face it. When you can write a Hurricane of Puns series whose plots make little to no sense and have it sell well, consistently, for several decades, you don't have to worry what the critics think.
In Night Watch there is a really nice example of lampshading. In the second act, the main character, Anton Gorodietsky has been framed for the unlawful killings of a series of Dark magicians. At a certain point, he is running away, being hunted relentlessly by his enemies, when suddenly a car stops, the door opens so he can climb inside, and then drives away at speed. Anton thinks: "Things like this just don't happen! Heroes only get rescued by passing cars in cheap action movies."
A Running Gag in Discworld novels is that million-to-one chances pan out nine times out of ten, and the characters are always aware of this. They'll even instruct those less aware that you have to say, loudly and clearly, that "It's a million-to-one chance, but it just might work!"
This was exaggerated in Guards! Guards! When they're trying to shoot the dragon in its voonerables, the Night Watch observe that particular point. When Carrot reckons that Fred just aiming and shooting at the voonerables has odds significantly better than million-to-one (thus making it a doomed proposition), he and Nobby add absurdity upon absurdity (like standing on one leg or stuffing a handkerchief in his mouth) to Fred's circumstances in order to engineer million-to-one chances of hitting the dragon in the right spot.
Part of what caused Colon, Nobby, and Carrot to start futzing the odds using the handkerchief, was Nobby asking, "But, what if by a one in a million chance, this shot in the voonerables doesn't work?" And since it was the first mention of the one in a million rule, it ensured that Colon's arrow would miss the dragon's voonerables.
Another way of reading it makes it even more painful — from memory, there's a reference to the god of Chance, who received "nine hundred and ninety-nine thousand, nine hundred and ninety-nine votes against"... so they were just off from the coveted million-to-one.
In the above example, the dragon counter attacks and destroys the brewery on which they were standing. Fortunately, since they'd just used up their one in ten failure, they survived the million-to-one odds in the ensuing blast.
Note that "nine times out of ten" becomes important when someone tries for their tenth million-to-one chance.
A similar nine out of ten situation occurs in Soul Music.
Ridcully: A good staff and a pocket full of spells will get you out of trouble nine times out of ten. Stibbons: And how many times have you used them? Ridcully: Well, there was that thing with the dragon, and that moving pictures business ... let's see, nine times so far. So there's nothing to worry about. Charge!
Naturally, Discworld is rife with smaller lampshadings as well, such as Otto's disappointment in The Truth that his ominous remarks weren't followed up by a roll of thunder, as they would've been back home in Uberwald. This is a cross-media lampshading, as thunder-for-emphasis is typical of the cheesy horror movies that Pratchett parodies with Uberwald.
In Sourcery, a genie transports some characters inside his lamp, which he's carrying inside the lamp with them. It works fine till the idiot hero starts to worry about how impossible it is, whereupon they get stranded halfway.
In : Dontgonearthe Castle, complete with signposts saying "Last chance not to go near the castle. "Really Dontgonearthe Castle", and "Last Chance! Dontgonearthe Castle!" leaving Nanny Ogg in stitches at the wonders of Reverse Psychology.
Most of Harry Turtledove's Alternate History novels feature at least one scene of a character musing on how their lives could have turned out differently had history gone the way it did in the real world. They quickly conclude that it's not worth thinking about and they should focus on the world they actually live in.
Just about every good Alternate History does this and quite a few of the bad ones do as well. You know if you have a good author if when they do this it gives the reader a slight chill instead of looking like it breaks the Fourth Wall.
Turtledove in particular does this with his characters musing on a real world alternate, particularly in the Crosstime Traffic novels and the Timeline-191 series. Just in case you didn't get the point of the alternate, it's important to have characters reflecting on the Confederate Holocaust with lines like, "God forbid, it could happen to Jews". One of the Crosstime Traffic novels, The Disunited States of America, ends a chapter with the following: "It seemed very final, like the end of a chapter. What lay ahead?"
Philip K. Dick's The Man in the High Castle subverts this. The book takes place in an alternate history where the Axis won WWII (and Japan and Germany partition and occupy the USA). The title character wrote an alternate history where the Axis didn't win World War II — but his novel is nothing like our world (in his novel, there's a Cold War between the US and a fascistic British Empire).
In The Traitor's Hand, as a squad of Imperial Guardsmen charge an enemy tank, the squad leader tries to motivate his men with, "Come on, men! Do you want to live forever?" Cain's thoughts? "The noncom in charge of the squad must have been on something... Nobody spoke like that outside of badly-written combat novels."
About half of Inquisitor Vail's commentary is lampshad hanging of where the story is obviously distorted or contradicts other things he says (for instance, every reference to his family).
In the John Grisham novel The Chamber, a young Chicago lawyer turns out to have taken a job at a prominent, liberal-leaning law firm with a number of Jewish senior partners specifically so that he can take over the case of one of their clients - a former KKK member on Death Row for killing the children of a Jewish lawyer who happens to be the young lawyer's grandfather. At one point, one of the firm's lawyers flat out asks how they came to represent this guy - to which another lawyer responds that it's a long story, and at that point kind of irrelevant.
The Lord Peter Wimsey series by Dorothy L Sayers features Harriet Vane, Lord Peter's love interest and a mystery novelist. Harriet and Peter have a number of conversations about how a given situation would be different if it were in a novel, including one in which Lord Peter remarks that no one complains how unlikely coincidences are when they happen in real life, but that fiction has to be plausible.
In an earlier Wimsey book, Clouds of Witness, the solution of the mystery depends on the assumption that each one of three major character had his or her reasons — which had absolutely nothing to do with the other two — to just have go out at exactly the same late night hour into the garden of a quiet English country house, and to keep very suspiciously quiet about it afterwards. The defense lawyer needing to clear one of these character of the charge of murder explicitly points out that this is a very unlikely coincidence, and still asks the court (and the reader) to believe it. The court, at least, does...
Agatha Christie's character Ariadne Oliver appears in seven of Christie's Hercule Poirot novels. Like Christie, she is a mystery writer who doesn't much care for her principal hero (vegetarian Finnish detective Sven Hjerson) but has to keep writing about him because he's popular with readers. Christie uses Ariadne to poke fun at the mystery genre, as well as herself and her own mistakes in her stories.
Christie did this a lot. In her novel And Then There Were None, Dr. Armstrong admonishes Blore for thinking that it's normal for Lombard to have a revolver, because "it's only in books people carry guns around."
In Curtain: Poirot's Last Case, we have Hastings saying "I was tired of this silly joking about my 'speaking countenance'. I could keep a secret as well as anyone. Poirot had always persisted in the humiliating belief that I am a transparent character and that anyone can read what is passing in my mind.".
In his book Be My Enemy, Christopher Brookmyre hangs a lampshade on Lampshade Hanging. After a corporate-type lampshades management-speak, one character notes that: "...taking the piss out of something was often a cheap way of buying your indulgence in it: you make one joke about it and people are less aware of how seriously you're taking it the rest of the time."
House of Leaves (for proper context, Navidson is exploring his house while burning... why, the same book you're reading! for light and is trying to read the text before the fire catches up to his spot): "Perhaps his reading slows or the paper burns unevenly or he has bungled the lighting of the next page. Or maybe the words have been arranged in such a way as to make them practically impossible to read."
In The Deptford Histories 3: Thomas, Woodget points out that the heroic organisation's plan to defeat Suruth Scarophion was ludicrously complicated and resulted in innumerable deaths. Thomas replies with "Well, they couldn't just give the fragments to the Scale, could they? Would've been downright suspicious."
In Haruki Murakami's The Wind-Up Bird Chronicle, the narrator states when his wife disappears that "I felt as if I had become part of a badly written novel, that someone was taking me to task for being utterly unreal. And perhaps it was true."
At the hilariously embarrassing climax of the Alice Munro short story "An Ounce of Cure", the main character is left musing on the ridiculousness of her situation:
"What was it that brought me back into the world again? It was the terrible and fascinating reality of my disaster; it was the way things happened...the development of events...that fascinated me; I felt that I had had a glimpse of the shameless, marvellous, shattering absurdity with which the plots of life, though not of fiction, are improvised I could not take my eyes off it."
Louis de Bernières's The War of Don Emmanuel's Nether Parts sets its second half firmly in the realms of Magical Realism (in which there is a plague of cats, a band of 16th century conquistadors is resurrected, and a burro and a woman separately give birth to cats), but furiously lampshades a wholly mundane sequence of outrageous coincidences in which the military chiefs of staff and the President assassinate each other with exploding coffins as "a heroic farce that stretch[es] credence to a limit".
In Arthur C. Clarke's novel The Sands of Mars the protagonist (a writer) discovers that the cabin boy on his spaceship is actually his son from a disastrous college love affair. He fumes that this is an outrageous violation of the laws of probability, and would never have happened in one of his novels.
Joan Hess has fun with this trope in her Maggody mysteries, such as when police chief Arly Hanks muses on the ludicrous number of murders (and weirdos) that've beset the quiet town since she moved back there. In The Merry Wives of Maggody, the men of Maggody make a bargain that could encourage them to kill each other, prompting another character to mock how much it sounds like a plot-device from a cheesy mystery novel.
Pulp Western writer J.T. Edson once hung a lampshade on a particularly amazing coincidence by saying in the narrative that it was such an unlikely one that no writer of fiction would ever include it in a story.
This is the first sentence of this story. This is the second sentence. This is the title of this story, which is also found several times in the story itself. This sentence is questioning the intrinsic value of the first two sentences. This sentence is to inform you, in case you haven't already realized it, that this is a self-referential story, that is, a story containing sentences that refer to their own structure and function. This is a sentence that provides an ending to the first paragraph.
For a somewhat serious example, in Stephen King's Bag of Bones the main character, a writer, quits writing because of the fate of another character, his much younger love interest, who is shot and dies in his arms. He says:
It occurred to me at some point this fall that I had written similar deaths in at least two of my books, and popular fiction is heaped with other examples of the same thing. Have you set up a moral dilemma you don't know how to solve?... Easiest thing in the world. "When the story starts going sour, bring on the man with the gun." Raymond Chandler said that, or something like it... To think I might have written such a hellishly convenient death in a book, ever, sickens me.
Older Than Print example: Dante hangs a lampshade towards the end of the Inferno segment of The Divine Comedy, over the fact that he seems to be running across so many Florentines in Hell that he knows or has heard of.
In the first chapter of The Tale of Genji, the narrator concludes her glamorous description of the protagonist's virtues and abilities thus:
The hero of Dale Brown's military technoporn novel Chains of Command finds himself sliding along a downward spiral, thinking that:
This whole situation was coming more and more to resemble the plot of a Dale Brown novel. Hell, maybe that's where they'd got the idea!
John Buchan's The Three Hostages opens with the hero and a friend discussing the tricks of thriller writing. The friend explains that the plot looks complicated because the author picked three unrelated things ("For instance...") and invented a plot to connect them. The hero is then called in to solve a mystery with three clues remarkably like the ones his friend mentioned, and the question of where he got those ideas is a plot key. The lampshade thus becomes part of the decor, so we can almost forget how blatantly it was hung in the first place.
The Dresden Files has protagonist Harry Dresden hang as many lampshades as he can find.
In Eric Flint's 1632 series he decides quickly that the story reads better if he uses modern idiom that would be foreign to many of the 17th century characters, so they're constantly lampshading the spread of modern American phrases and sayings throughout Europe based on Grantville's influence.
Sir James Spens, one of Gustav Adolf's advisors, also lampshades the entire setting:
"A colony of Englishmen from a future America find themselves planted in the middle of Thuringia? It's a thing of fable! The tales of Rabelais and Sir Thomas More come to life!"
In the Starfleet Corps of Engineers novella "War Stories", Sonya Gomez, looking for every bit of extra power, curses the "fool of an engineer who designed the holodeck with an incompatible power system." This was a reference to the much maligned Hand Wave from Voyager to explain why the crew could use the holodeck under those circumstances.
"I must begin with a coincidence which I would not dare to recount if this were a work of fiction." Thus the first line of Mary Stewart's Stormy Petrel. She then argues, reasonably enough, that coincidences do happen in real life, and it's only in art that we object to them.
Horror author Brian Keene wrote a novel called Darkness on the Edge of Town, which shares a few similarities with the Stephen King novella "The Mist". Keene pre-empted critics claiming that Darkness ripped off "The Mist", by having the characters in his novel outright discuss "The Mist" and actually point out the similarities between the two situations in their dialogue.
Cuncz points out how stupid it is to hide something important inside a golden reliquary; that's one of the first things common thieves breaking into a church would grab. Garnerius's secret vault would also tip off a thief that something valuable was hidden there. Cuncz, by contrast, elected to hide his documents in plain sight; among another stack of papers in a leather case inside his desk which, in a largely illiterate society, would require anyone looking for those particular papers would have to be literate themselves to know it was what they're looking for.
In Wolf Hall, the One Steve Limit is very much averted, as a very large proportion of its cast has the name Thomas. In one scene, Thomas Cromwell has has first meeting with Thomas Boleyn, and thinks to himself that Boleyn won't remember him, because "half the world is named Thomas".