Through the looking glass: Every once in a while we'll hear about a celebrity being stalked by a fan. Usually it is some movie or television personality like Kim Kardashian or famous musical artist like Taylor Swift. It is rare that you hear about someone hounding the likes of people like Bill Gates or Tim Cook, until now.

Apple has obtained a temporary restraining order against a man who has allegedly been harassing several company executives and stalking Tim Cook.

According to an affidavit signed by an Apple security officer, a man named Rakesh "Rocky" Sharma left threatening messages with company executives. At least one of the voicemails indicated that the man "knows" where the executives live. It also threatened that Sharma or someone he knew would resort to gun violence.

"I don't use ammunition, but I know people who do," one message said.

The situation "escalated" when Sharma showed up at Tim Cook's Palo Alto residence on December 4, 2019. Sharma entered through a closed gate with flowers and champagne. He later posted several sexually lewd pictures to his Twitter account tagging Cook in the tweets. Then on January 15, 2020, Sharma again trespassed on Cook's property, ringing the doorbell. Palo Alto police were called, but the man fled before officers arrived.

The affidavit and other documents were tweeted by tech news site OneZero's Dave Gershorn, but only after the nonprofit Think Computer Foundation filed a lawsuit to make the documents public. Previously, the court submissions were only available in-person.

NBC News reported that documents were filed with the Santa Clara County Superior Court on February 13, asking for a restraining order against Sharma. The court granted the request, forbidding Sharma from going near Cook, his residence, any of the executive team, or Cupertino headquarters Apple Park. The court order expires on March 3, the same day a hearing in the matter is scheduled to be held.

Masthead credit: Laura Hutton via Shutterstock