Silicon Valley reacted on Twitter to a Donald Trump presidency with a mix of humor, despair and a small trace of hope.

Tech workers gave 60 times more cash to Clinton than to Trump, so it's fair to say he was not the favorite to win among this crowd.

Facebook director and Silicon Valley investor Peter Thiel — who addressed the Republican National Convention and spent more than $1 million supporting Trump — got it right, venture capitalist and entrepreneur Shervin Pishevar noted in a Tweet.

Peter Thiel turned out not to be contrarian at all

Pishevar also Tweeted that his next investment will be in support of California's secession from the U.S. He was not joking, it's the most patriotic thing he can do now, he told CNBC.

"We can re-enter the union after California becomes a nation. As the sixth largest economy in the world, the economic engine of the nation and provider of a large percentage of the federal budget, California carries a lot of weight. We can then convene a new constitutional convention to make systemic changes needed to our nation," wrote Pishevar in an email to CNBC.

"At the same time we need to have a serious national dialogue about our culture, values and the rampant sexism, racism and hate that Trump campaign has exposed.This is a tipping point for our nation and we must confront the systemic problems that this election has exposed," wrote Pishevar.