@Konboi memo

主に技術に関してつらつらと。

2016-04-01から1ヶ月間の記事一覧

brewでのnginx openrestyのインストールに嵌ったのでメモ

はじめに OpenResty を使ってやりたいことがあったので 手元の環境(Mac)にhomebrewを使ってインストールしようと思ったらエラーがでて嵌ったのでメモ TL;DR brew install opensll brew link --force opensll brew install ngx_openresty エラーになる nginx …

net/httpで静的ファイルを返す

追記 (2016/04/13) 完全に読み間違えていましたね やっちゃいけないそうです shogo82148.github.io やるならこう func main() { http.HandleFunc("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static")))) http.ListenAndServe(":30…

GoでMySQLからdatetimeのデータを引いてtime.Time に食わせるときに嵌った

db, err := sql.Open("mysql", "<user>:<password>@/<db name>?parseTime=true&loc=Asia%2FTokyo") parseTime=true をつけるといい感じにparesしてくれる ただこれだとUTCになるっぽうので loc=Asia/Tokyo をつけるとよい github.com</db></password></user>