Uit Wikipedia:
California ground squirrels are frequently preyed on by rattlesnakes. They are also preyed on by eagles, raccoons, foxes, badgers, and weasels. Interdisciplinary research at the University of California, Davis, since the 1970s has shown that the squirrels use a variety of techniques to reduce rattlesnake predation.
Some populations of California ground squirrels have varying levels of resistance to rattlesnake venom as adults. Female squirrels with pups also chew on the skins shed by rattlesnakes and then lick themselves and their pups (who are never resistant to venom before one month of age) to disguise their scent.
Sand-kicking and other forms of harassment provoke the snake to rattle its tail, which allows a squirrel to assess the size and activity level (dependent on blood temperature) of the snake.
Another strategy is for a squirrel to super-heat and swish around its tail. When hunting, rattlesnakes primarily rely on their pit organ, which detects infra-red radiation. The hot-tail-swishing appears to convey the message “I am not a threat, but I am too big and swift-moving for it to be worth trying to hunt me.”
These two confrontational techniques also distract the snake from any nearby squirrel burrows containing pups.