Skip to content

Instantly share code, notes, and snippets.

View august-zou's full-sized avatar

august august-zou

  • HangZhou Normal University
  • HangZhou
View GitHub Profile
@august-zou
august-zou / underscore.go
Created March 8, 2017 01:37 — forked from regeda/underscore.go
Convert CamelCase to underscore in golang
package main
import (
"fmt"
"regexp"
"strings"
)
var camel = regexp.MustCompile("(^[^A-Z]*|[A-Z]*)([A-Z][^A-Z]+|$)")
@august-zou
august-zou / learning_resources.md
Created December 13, 2015 02:35 — forked from nathansmith/web-design-development-learning-resources.md
Resources for learning web design & front-end development
#include <ifaddrs.h>
// http://stackoverflow.com/questions/25626117/how-to-get-ip-address-in-swift
func getIFAddresses() -> [String] {
var addresses = [String]()
// Get list of all interfaces on the local machine:
var ifaddr : UnsafeMutablePointer<ifaddrs> = nil
if getifaddrs(&ifaddr) == 0 {