Phil Libin had not eaten in five days when he arrived at the Code technology conference near Los Angeles in late May. Truffle-infused macaroni and cheese, pork sliders, and ice cream sandwiches were a big draw for many of the attendees, but the investor and former Evernote CEO preferred instead to wander the food stalls to smell the delicacies on offer. He says he had no interest in actually tasting any of the food. The lack of hunger has been one of the more unexpected outcomes of his regular multi-day fasts. For up to 8 days at a time, Libin will consume only water, tea and black coffee. He's lost about 80 pounds in seven months, and is hoping to drop an additional five pounds. Libin is now an outspoken proponent of intermittent fasting, an increasingly popular trend in Silicon Valley. Libin is just one of a growing number of technology executives, who are finding new ways to get healthy, lose weight and gain energy -- some more extreme than others. "People think it's really wild and crazy," Libin told CNBC in an interview at the San Francisco offices of his company All Turtles. "Turns out it has been really easy." Libin made a name for himself as the long-time leader of note-taking app Evernote. While running that company, he learned that he was borderline pre-diabetic, meaning he had a high risk of type 2 diabetes.

Phil Libin, CEO of Evernote at Sun Valley's Allen & Co. Annual Conference. Geoff Nelson | CNBC

He tried out a vast array of diets over the years, including Atkins, which emphasizes cutting out carbohydrates, and occasionally lost some weight. But he would always put it back on within a few months. "I really wanted to find something I could stick with, and really didn't expect it to be fasting," he explained.

The fasting subculture among Silicon Valley execs