Skip to content

Instantly share code, notes, and snippets.

@yukidarake
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yukidarake/ef859726dd560bc06318 to your computer and use it in GitHub Desktop.
Save yukidarake/ef859726dd560bc06318 to your computer and use it in GitHub Desktop.
某大会用アンチョコ

インストールしているもの

go get -u code.google.com/p/go.tools/cmd/cover
go get -u code.google.com/p/go.tools/cmd/godoc
go get -u code.google.com/p/go.tools/cmd/goimports
go get -u code.google.com/p/go.tools/cmd/oracle
go get -u code.google.com/p/go.tools/cmd/vet
go get -u code.google.com/p/rog-go/exp/cmd/godef
go get -u github.com/golang/glog
go get -u github.com/pilu/fresh
go get -u github.com/golang/lint
go get -u github.com/motemen/ghq
go get -u github.com/nsf/gocode
go get -u github.com/peco/peco/cmd/peco

# ashigakari
go get -u code.google.com/p/go.crypto/bcrypt
go get -u github.com/gorilla/context
go get -u github.com/gorilla/sessions
go get -u labix.org/v2/mgo

イディオム

// CPUを使い切る
runtime.GOMAXPROCS(runtime.NumCPU())

// KeepAlive切ったほうが有利な場合
w.Header().Set("Connection", "close")

ベンチマーク

wrk -t 4 -c 400 http://localhost:8000/hello

MongoDB

# Store data in /usr/local/var/mongodb instead of the default /data/db
systemLog:
  destination: file
  path: /usr/local/var/log/mongodb/mongo.log
  quiet: true
  logAppend: true

# Only accept local connections
# net:
#  bindIp: 127.0.0.1

storage:
  dbPath: /usr/local/var/mongodb
  journal:
    enabled: false
    commitIntervalMs: 300

参考リンク

環境音

http://listenonrepeat.com/?v=eN9razXbrLw#%E3%80%90%E7%99%92%E3%81%97%E7%B3%BB%E3%80%91%E8%87%AA%E7%84%B6%E9%9F%B3_%E9%9B%A8%E3%81%AE%E6%A3%AE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment