There's no such thing as a "snippet" when it comes to editing metadata in a binary MOBI file. It's extremely involved, no matter what programming/scripting language you use. That's why people just tend to use whatever is already "out there."
Mobi2Mobi-Gui or the command-line mobiperl tools will allow you to edit the 501 record. Both have "stickied" threads in this forum.