Public shaming has a definite dark side. In March, Adria Richards caused a firestorm when she tweeted a picture of two men at a technical conference in Santa Clara, California, along with crude jokes they had been making, in an attempt to shame them. One of the men was fired, and Richards herself was eventually fired, too.

But sometimes public shaming can be a good thing. Take, for instance, Reno brewpub Brewer’s Cabinet, which took public shaming to a whole new level this month, posting a photo on Facebook of a customer who stiffed the brewpub on a $100 tab, along with a plea to call the police if they saw him. “While you’re at it,” the bar wrote, “you could tell him that visiting restaurants/bars with your friends, running up a huge bill, roughing up servers and then bailing is pretty uncool ... pathetic, really. Get a life, man.”

It worked. A few days later, Reno police arrested Saul Zelaznog on a probation violation.

And earlier this month in Phoenix, Tim Lake, fed up with his Amazon packages being stolen, put up surveillance cameras at his home to record footage of the culprit. The video now has 2.2 million views on YouTube, and Lake, in a clever twist on social media, also put up posters of the thief all over his neighborhood and set up an email address for tips—using AOL, which he says “is still cool.” No arrests have been made in that case.

The lesson here? With the right approach, public shaming can sometimes be a public service.