- prettierのキーバインド
Usage
Using Command Palette (CMD/CTRL + Shift + P)
1. CMD + Shift + P -> Format Document
OR
// 既定値を上書きするには、このファイル内にキー バインドを挿入します | |
[ | |
{ "key": "ctrl+d", "command": "deleteRight", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+h", "command": "deleteLeft", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+f", "command": "cursorRight", | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
) | |
func main() { | |
if len(os.Args) != 2 { | |
fmt.Fprintln(os.Stderr, "Usage: go run main.go filename") |
Usage
Using Command Palette (CMD/CTRL + Shift + P)
1. CMD + Shift + P -> Format Document
OR
worker_processes 1; | |
# worker_rlimit_nofile 65535; | |
events { | |
worker_connections 10240; | |
} | |
error_log logs/error.log; | |
pid logs/nginx.pid; |
# CentOS7へのインストール | |
# https://www.getenvoy.io/install/envoy/centos/ | |
# config参考 | |
# https://qiita.com/TokyoYoshida/items/8f614dc5051926bda605 | |
# https://i-beam.org/2019/02/03/envoy-static-load-balancer/ | |
# このコンフィグを、下記コマンドで動かそうとすると、 | |
# $ envoy --config-yaml config.yml | |
# error initializing configuration '': Unable to convert YAML as JSON: config.yml | |
# と言われてしまったので、jsonに変換して動かす。 | |
# $ envoy -c config.json |
$ go test -bench . -benchmem
goos: linux
goarch: amd64
pkg: a
cpu: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
Benchmark_snappy_encode-8 8189756 145.9 ns/op 176 B/op 1 allocs/op
Benchmark_snappy_decode-8 14360095 77.73 ns/op 112 B/op 1 allocs/op
Benchmark_snappy_decode_and_json_unmarshal-8 211792 5511 ns/op 2128 B/op 32 allocs/op
Benchmark_json_unmarshal-8 234332 4878 ns/op 2016 B/op 31 allocs/op
package main | |
import "fmt" | |
type A struct { | |
a string | |
} | |
func NewA(strp *string) *A { | |
if strp == nil { |