$ sudo -i
# vim /etc/systemd/system/somaxconn1024.service
# systemctl enable somaxconn1024
# systemctl start somaxconn1024
# systemctl status somaxconn1024
# cat /proc/sys/net/core/somaxconn
$ sudo -i
# vim /etc/systemd/system/disable-transparent-huge-pages.service
# systemctl enable disable-transparent-huge-pages
# systemctl start disable-transparent-huge-pages
# systemctl status disable-transparent-huge-pages
# cat /sys/kernel/mm/transparent_hugepage/enabled
# cat /sys/kernel/mm/transparent_hugepage/defrag
GZip圧縮したものをうまいことGoogle Cloud Storageにアップロードできなかったので調べた結果,
ContentTyperインタフェースのメソッドを実装することによって解決できることがわかったので そのためのコードを残しておく.
以下サンプル
import (
...
"google.golang.org/api/storage/v1"
This file contains hidden or 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
extension Alamofire.Request { | |
public func responseObject<T: Decodable where T == T.DecodedType>(completionHandler: Response<T, NSError> -> Void) -> Self { | |
let responseSerializer = ResponseSerializer<T, NSError> { request, response, data, error in | |
guard error == nil else { return .Failure(error!) } | |
let JSONResponseSerializer = Request.JSONResponseSerializer(options: .AllowFragments) | |
let result = JSONResponseSerializer.serializeResponse(request, response, data, error) | |
switch result { | |
case .Success(let value): |
This file contains hidden or 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
package main | |
import "fmt" | |
func 後藤(i int) { | |
fmt.Println("Q: 後藤さんは何匹でしょう?") | |
if i == 1 { | |
goto STATUS1 | |
} else if i == 2 { | |
goto STATUS2 |
This file contains hidden or 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
py -3.4-32 -m pip install -U pip cython wheel | |
py -3.4-x64 -m pip install -U pip cython wheel | |
py -2.7-32 -m pip install -U pip cython wheel | |
py -2.7-x64 -m pip install -U pip cython wheel | |
py -3.4-32 setup.py bdist_wheel | |
py -3.4-x64 setup.py bdist_wheel | |
py -2.7-32 setup.py bdist_wheel | |
py -2.7-x64 setup.py bdist_wheel |
This file contains hidden or 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
---------- RAW ---------- | |
JSON 34291 byte(s) | |
MsgPack 26364 byte(s) | |
---------- GZIP --------- | |
JSON 05986 byte(s) | |
MsgPack 06198 byte(s) | |
---------- LZ4 ---------- | |
JSON 09758 byte(s) | |
MsgPack 08548 byte(s) |
This file contains hidden or 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
#!/bin/bash | |
go version | |
go test -benchmem -bench . |