They edited the original title, which was the chemical formula for the reaction. At first glance, I really thought it was APL for a second (with all the symbols it had in the formula).
Most of these (at least now) are made of sugar and baking soda. They used to be made of mercury thiocyanate back when we didn't know mercury poisoning was trouble.
The traditional "Pharaoh's serpent" version of this firework produced a more impressive snake, but its operation depended upon mercury thiocyanate, which is no longer used because of its toxicity.
Why is this comment voted down to -3? Granted, his proposal might not be feasible, but at least he's thinking...if it wouldn't work, post a comment explaining why.
If what wouldn't work? It's a chemical reaction that produces some kind of foamy result. You can buy a can of foam spray at Home Depot that expands and could be used as a "physical force generator".
It's been a while but I could start to explain it and maybe someone can pick it up from my rusty memory.
Mercury thiocyanate, Hg(SCN)2, decomposes at about 165 degrees Farenheit[1] to elemental components. I would guess that the shape of the product in that video is most likely due to the gases that are formed (most likely cyanide and mercury gas). I'm guessing the products are sulphur, cyanide vapor and mercury vapor. I'm also guessing that there are some oxides of sulphur and nitrogen forming since oxygen is readily available.
A safer experiment can be performed using baking soda and sugar, although I believe you've got to add a fuel to allow it to self-burn, but isopropyl alcohol should be all that's required. These produce 'black snakes' rather than the golden ones from this video. There's recipies online for the concoction, however you can pick up packs of a dozen or so 'black snakes' from firework stores.
They're non-explosive, so I don't imagine you'd have a hard time tracking some down if you wanted to see it personally.
Also: http://en.wikipedia.org/wiki/Black_Magic_Snakes