netstat -tn 2>/dev/null | grep :80 | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr | head
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// import "github.com/julienschmidt/httprouter" | |
// example router | |
// Serve static files for Assets | |
router := httprouter.New() | |
router.GET("/fonts/*filepath", fileHandler("/fonts/")) | |
router.GET("/styles/*filepath", fileHandler("/styles/")) | |
router.GET("/scripts/*filepath", fileHandler("/scripts/")) | |
router.GET("/img/*filepath", fileHandler("/img/")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure you grab the latest version | |
curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip | |
# Unzip | |
unzip protoc-3.2.0-linux-x86_64.zip -d protoc3 | |
# Move protoc to /usr/local/bin/ | |
sudo mv protoc3/bin/* /usr/local/bin/ | |
# Move protoc3/include to /usr/local/include/ |
After download and move to your interested folder, add this line to ~/.bashrc and ~/.profile
export GOPATH=$HOME/gowork
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOPATH/bin
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin