They say revenge is a dish best served cold. But for Mark Rober, it's much sweeter served smart, smelly and covered in glitter.

The former NASA engineer-turned-YouTube star has received plaudits online after designing a booby trap to avenge all those who've fallen victim to a new wave of neighborhood crime: doorstep delivery theft.

Rober spent six months combining GPS tracking, cameras, fart spray and glitter in an elaborate and amusing mechanism after discovering thieves had stolen an Amazon delivery from his doorstep.

In a video posted on his channel, the 38-year-old, who helped design the U.S. space agency's Curiosity Rover, said his engineering experience left him well-placed to "take a stand" after dismissive police left him feeling "powerless."

"If anyone was going to make a revenge ... package and over-engineer the crap out of it, it was going to be me," said Rober, who spent nine years with NASA.