If there is one gecko that would attack a predator, it's a Tokay.
Tokay geckos are known to be fairly aggressive, and when kept as pets, can inflict a painful bite. In the wild, their attitudes can be heightened, especially when a predator is in their midst.
Sawet Numpet of Thailand happened across not one, but two Tokay geckos, (Gekko gecko) apparently agitated because a tree snake was near them. Numpet took out his phone and started recording the encounter as one of the Tokay geckos starts to attack and bite the tree snake, which doesn’t want to move from its perch. After each attack, the snake remained perched on the tree.
After a few moments, Numpet gently pokes the snake with a stick, which caused the reptile to immediately regurgitate its meal, which appeared to be a juvenile Tokay gecko. The snake slithered off higher into the tree, and the little red gecko, after a few moments to catch its breath, scampered off as well.
Max Nickerson, a curator with the Florida Museum of Natural History’s Division of Herpetology told National Geographic that the snakes giving up its meal was a non-surprise.
"When they swallow something relatively large, it can make them less mobile, so when they're harassed, it's common for them to regurgitate the meal," he said. He noted that the larger Tokay geckos didn’t attack the snake out of concern for the swallowed gecko, but were most likely attacking the predator out of aggression.
"I haven't observed them doing that," he said, "but if there's one gecko that would do it, it's a Tokay."