Skip to content

Instantly share code, notes, and snippets.

Hiroaki Nakamura hnakamur

Block or report user

Report or block hnakamur

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
hnakamur / index.html
Last active May 27, 2019
cytoscape network weathermap experiment
View index.html
<title>network weathermap demo using cytoscape.js</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<script src=""></script>
<script src=""></script>
#cy {
position: absolute;
hnakamur / main.go
Created Mar 9, 2018
a go example for waiting file lock, based on
View main.go
package main
import (
hnakamur / index.html
Created Sep 18, 2017
await in loop experiment
View index.html
<!DOCTYPE html>
<meta charset="utf-8"/>
<title>Async await loop experiment</title>
function foo(i) {
return new Promise((resolve, reject) => {
console.log('foo', i);
hnakamur /
Last active May 27, 2019
badger, goleveldb, boltdb benchmark
hnakamur@express:~/go/src/$ go test -count=10 -run='^$' -bench=. -benchmem
goos: linux
goarch: amd64
BenchmarkGetBadger-2             5000000               399 ns/op          22.50 MB/s          40 B/op          2 allocs/op
BenchmarkGetBadger-2             5000000               390 ns/op          23.04 MB/s          40 B/op          2 allocs/op
BenchmarkGetBadger-2             5000000               390 ns/op          23.03 MB/s          40 B/op          2 allocs/op
BenchmarkGetBadger-2             5000000               391 ns/op          22.97 MB/s          40 B/op          2 allocs/op
BenchmarkGetBadger-2             5000000               391 ns/op          22.96 MB/s          40 B/op          2 allocs/op
hnakamur / benchmark_test.go
Created Jul 21, 2017
benchmark of and
View benchmark_test.go
package main
import (
linuxuuid ""
func BenchmarkLinuxKernelUUIDv4(b *testing.B) {
hnakamur /
Last active Jul 3, 2017
etcd v3の設定メモ


debug: true
name: etcd01
data-dir: /var/lib/etcd
hnakamur / index.html
Last active Jan 9, 2018
Noto Sans CJK JP local font and webfont experiment
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
@font-face {
font-family: 'Noto Sans JP';
font-style: normal;
font-weight: 300;
src: local("Noto Sans CJK JP"),
/* NOTE: you need to use v5 (not v6) to have effect of font-feature-settings: "palt" */
url(// format('woff2'),
hnakamur / memo.txt
Created Jun 23, 2017
View memo.txt
HttpTransact::is_response_cacheable(State *s, HTTPHdr *request, HTTPHdr *response)
is_response_cacheable の検索結果
hnakamur / go-carbon-carbonapi-grafana-setup-memo.txt
Last active Jul 4, 2019
go-carbon with built-in carbonserver enabled, carbonapi and grafana setup memo
View go-carbon-carbonapi-grafana-setup-memo.txt
# setup go
curl -sS | tar zxf - -C /usr/local
export PATH=/usr/local/go/bin:$HOME/go/bin:$PATH
yum install -y make git
# setup go-carbon
go get -d
cd $HOME/go/src/
View .rpmmacros
# The original settings confirmed by running: rpm --showrc
# -14: __gpg %{_bindir}/gpg2
# -14: __gpg_check_password_cmd %{__gpg}
# gpg --batch --no-verbose --passphrase-fd 3 -u "%{_gpg_name}" -so -
# -14: __gpg_sign_cmd %{__gpg}
# gpg --batch --no-verbose --no-armor --passphrase-fd 3
# %{?_gpg_digest_algo:--digest-algo %{_gpg_digest_algo}}
# --no-secmem-warning
# -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}
You can’t perform that action at this time.