Before she boarded a plane from London to South Africa in December 2013, Justine Sacco, the director of corporate communications for media company IAC, tweeted a series of snarky observations to her 170 followers. The last read, "Going to Africa. Hope I don't get AIDS. Just kidding. I'm white!"

During the flight, while Sacco was offline, her tweet went viral and she was deluged with Twitter replies that ranged from disgust to anger. Before long, the hashtag #HasJustineLandedYet started trending worldwide, and there were increasing demands that Sacco be fired. Eventually, she was.

Sacco's not the only one to experience the wrath -- and consequences -- of a Twitter pile-on. Earlier that year, developer and tech evangelist Adria Richards complained on Twitter about two male developers who swapped what she felt were offensive jokes at a developer conference. Two days later, the man responsible for the joke was fired. He posted his account of what happened under a pseudonym in the online forum Hacker News, which led to a barrage of threatening tweets against Richards and a denial of service attack on SendGrid, Richards' employer. Eventually, SendGrid let her go.

Then there was the case of Gene Morphis, CFO of clothing retailer Francesca's, who in 2012 tweeted "Board meeting. Good numbers=Happy Board," sending Francesca's stock soaring 15%, exposing the company to possible SEC scrutiny -- and costing Morphis his job.

Or the employee of New Media Strategies, the agency that ran Chrysler's Twitter account, who in 2011 posted under Chrysler's handle: "I find it ironic that Detroit is known as the #motorcity and yet no one here knows how to [expletive] drive." Chrysler's tweet was quickly deleted, but news of it still went viral. The agency fired the perpetrator -- and Chrysler fired the agency.

Social media mishaps can have dire consequences for both the employees involved and the company, as IAC, SendGrid, Francesca's and Chrysler learned. And as social media usage continues to permeate the workplace and blur work-life lines, some companies are finding themselves thrust into a scrutinizing spotlight.