% sysctl -n hw.model
Macmini9,1
% /usr/libexec/PlistBuddy -c 'print :"CPU Names"' ~/Library/Preferences/com.apple.SystemProfiler.plist | awk -F ' = ' '{prevlast=last; last=$2} END{print prevlast}'
Mac mini (M1, 2020)
% sysctl -n hw.model
Macmini9,1
% /usr/libexec/PlistBuddy -c 'print :"CPU Names"' ~/Library/Preferences/com.apple.SystemProfiler.plist | awk -F ' = ' '{prevlast=last; last=$2} END{print prevlast}'
Mac mini (M1, 2020)
| FROM ubuntu:20.04 | |
| RUN apt-get update \ | |
| && DEBIAN_FRONTEND=noninteractive apt-get -y install git mercurial build-essential cmake ninja-build golang-go zlib1g-dev libpcre3-dev | |
| RUN git clone https://github.com/google/boringssl \ | |
| && cd boringssl \ | |
| && mkdir build \ | |
| && cd build \ | |
| && cmake -GNinja .. \ |
| #!/usr/bin/env python3 | |
| import socket | |
| target_host = "localhost" | |
| socket_path = "/var/snap/lxd/common/lxd/unix.socket" | |
| client = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) | |
| client.connect(socket_path) | |
| # send some data |
| #include <errno.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <time.h> | |
| const int sec_in_nsec = 1000000000; | |
| #define ITERMAX 10000 | |
| typedef long long nanotime_t; |
| #line 1 "cgo-builtin-prolog" | |
| #include <stddef.h> /* for ptrdiff_t and size_t below */ | |
| /* Define intgo when compiling with GCC. */ | |
| typedef ptrdiff_t intgo; | |
| #define GO_CGO_GOSTRING_TYPEDEF | |
| typedef struct { const char *p; intgo n; } _GoString_; | |
| typedef struct { char *p; intgo n; intgo c; } _GoBytes_; |
| After I read https://github.com/rupor-github/wsl-ssh-agent/tree/a305054739d6ce1fa6261a8b4cb673df083b160e/systray | |
| I was curious about modification made for systray bundled in wsl-ssh-agent and here are diffs. |
| > スワップは遅くて非効率という意味で「悪」と考えられており、システムがスワップを定常的に使う必要があるのであれば、それは明らかに十分なメモリを持っていないということです。 […] > あなたの要求を全て処理するのに十分な RAM があり、それを超えることが絶対起こらないと言え るなら、スワップスペースなしでシステムを稼働することは完全に安全と言えるでしょう。 |
| $ go test -bench=. -benchmem | |
| goos: linux | |
| goarch: amd64 | |
| BenchmarkHashNewSum-2 5807700 205 ns/op 112 B/op 2 allocs/op | |
| BenchmarkHashNewSum2-2 8323488 142 ns/op 0 B/op 0 allocs/op | |
| BenchmarkHashSum-2 8817842 134 ns/op 0 B/op 0 allocs/op | |
| BenchmarkHashSum2-2 7696573 155 ns/op 16 B/op 1 allocs/op | |
| PASS | |
| ok _/home/hnakamur/hash-benchmark 5.402s | |
| $ go version |
| FROM openresty/openresty:1.15.8.1-3-alpine-fat | |
| ADD nginx.conf /usr/local/openresty/nginx/conf/nginx.conf |
| package foo | |
| import ( | |
| "testing" | |
| "github.com/nsf/jsondiff" | |
| ) | |
| var jsondiffOpts = jsondiff.DefaultConsoleOptions() |