​​The tech industry concentrated in Silicon Valley, south of San Francisco, has increasingly moved into the city itself, creating tensions in a place once synonymous with hippies and counterculture.