(CNN)Presidents come into the Oval Office with all sorts of plans, but it's the unscripted moments that also define their legacies.
The viral presidency: Obama's best unscripted moments
A classic Ronald Reagan moment came when, while being wheeled into an operating room after being shot by a would-be assassin, he told his wife, "Honey, I forgot to duck." President Jimmy Carter's surreal encounter with a hissing, demented rabbit dealt a major blow to his image. And President Gerald Ford suffered a similar fate when he slipped and fell in the rain while walking down the steps from Air Force One.
No matter how much a president's handlers try to choreograph his actions, there's invariably some spontaneous encounter that shapes how the American public perceives a president. President Obama, who has been criticized for a Spock-like aloofness, is no exception.
The only difference is, he became president just as the world of social media exploded, and his words and images have been retweeted, shared and transformed into online memes. He's not just the first black president; he's the first viral president. He now even has his own Twitter account.
To be sure, some of those moments have been scripted, such as his Buzzfeed video to sell Obamacare and his "Between Two Ferns" interview.
Others, like his open-mic comments about his relationships with Vladimir Putin and Benjamin Netanyahu, may have left Obama wishing for a do-over.
But as his presidency approaches its final 18 months, here are some of the viral moments that offer a peek into Obama's playfulness and racial pride -- as well as a mean streak that seems like a requisite for the Oval Office:
Obama doesn't talk much about his race, but he's still found subtle yet memorable ways to invoke his racial heritage.
Obama's bicultural language -- he could communicate with black and white audiences in different ways -- manifested itself in a video that went viral. In it, Obama is seen shaking hands with a white staffer in the Team USA locker room before offering Kevin Durant a vastly more expressive greeting.
Such scenes inspired a famous skit by the comedians Key & Peele.
In the first year of his presidency, a 5-year-old black boy visiting Obama in the Oval Office had an odd question for the president. The photo of Obama's answer became a classic.
Obama's connection with working-class people of color helped propel him to the White House. An impromptu greeting he shared with a janitor captured that bond.
Every president has to know how to work a stage. Obama took his penchant for performance in an unexpected direction one night when he stood on the famed Apollo Theater in New York City.
One of the most memorable moments during Obama's presidency came early on when a Republican lawmaker yelled "You lie!" while he gave a speech on health care to Congress in 2009. It was a prelude to vicious partisan warfare that would mark his term in office. Here are others.
During this year's State of the Union address, Obama delivered a classic "drop-the-mic" moment when Republican legislators heckled him. His response inspired Internet memes.
Obama's competitive instinct is well-known. During a tense televised meeting over Obamacare with Republicans, he delivered a putdown to his former Republican opponent for the White House that still hurts today when you listen.
Obama's dislike of former Republican presidential candidate Mitt Romney was palpable. During one tense televised debate, Obama encouraged Romney to walk into a rhetorical trap with an ominous invitation that became a meme: "Please proceed, governor."
Obama is known for being a bookish introvert who disdains the press-fleshing side of politics. But he also has a playful side that he flashed even amid the most the tense moments of his presidency.
During one campaign stop at a Florida pizza shop, Obama met one supporter who couldn't contain his excitement. His "greeting" of Obama became a classic photo.
Even presidents have to walk the dog. The photo of Obama trying to keep up with Bo, the new presidential pup, captured his youthful vigor.
Politicians get caught in all sorts of tangled webs. Obama's reaction to getting caught in one outside the Oval Office became a classic.
Politicians hold babies at their risk. Photos of babies throwing up on the shirts of gamely grinning politicians fill the Internet. One crying baby, though, had a different reaction when Obama reached for her.
The media has often looked at black families through the prism of pathologies: single-family homes, poverty rates, unwed mothers. But offering an almost weekly image of an intact, affectionate black family may be one of Obama's most underrated achievements.
During an event marking the 50th anniversary of the Bloody Sunday march in Selma, Alabama, Obama was sitting next to his wife onstage when they both did something that was subtle, and so romantic.
To celebrate his 2012 re-election, Obama tweeted out a photo of him and his wife, Michelle, embracing with the simple message, "Four more years." It would become the most retweeted photo in history.
The President and his wife were at a Team USA basketball game in Washington when the "kiss cam" displayed their image before the arena. What they did next even made their oldest daughter, Malia, smile.
After delivering his second inaugural speech before a huge crowd at the U.S. Capitol, Obama walked back from the podium with his family. He paused, turned around and took one last look at the now departing crowd. What he said next would go viral.