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
hnakamur / etcd-config-memo.md
Last active Jul 3, 2017
etcd v3の設定メモ
View etcd-config-memo.md

etcd01:/etc/etcd/etcd.yaml

debug: true
name: etcd01
data-dir: /var/lib/etcd
initial-advertise-peer-urls: https://10.155.92.228:2380
listen-peer-urls: https://10.155.92.228:2380
advertise-client-urls: https://10.155.92.228:2379
listen-client-urls: https://10.155.92.228:2379
@hnakamur
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">
<style>
@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(//fonts.gstatic.com/ea/notosansjapanese/v5/NotoSansJP-Light.woff2) format('woff2'),
@hnakamur
hnakamur / memo.txt
Created Jun 23, 2017
trafficserverでis_response_cacheableの呼び出し元をたどるコードリーディング
View memo.txt
対象バージョンは6.2.0
bool
HttpTransact::is_response_cacheable(State *s, HTTPHdr *request, HTTPHdr *response)
の実装
https://github.com/apache/trafficserver/blob/6.2.0/proxy/http/HttpTransact.cc#L6127
is_response_cacheable の検索結果
```
@hnakamur
hnakamur / go-carbon-carbonapi-grafana-setup-memo.txt
Last active Nov 3, 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 https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz | 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 github.com/lomik/go-carbon
cd $HOME/go/src/github.com/lomik/go-carbon
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}
@hnakamur
hnakamur / swap-caps-ctrl.reg
Created Mar 4, 2017
swap caps and left control keys on windows
View swap-caps-ctrl.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,02,00,00,00,00,00,03,00,00,00,1d,00,3a,00,3a,00,1d,00,00,00,00,00
@hnakamur
hnakamur / CentOS-Gluster-3.8-Sources.repo
Created Feb 18, 2017
GlusterFS 3.8 srpm repository for CentOS 7
View CentOS-Gluster-3.8-Sources.repo
# CentOS-Gluster-3.8-Sources.repo
#
# Please see http://wiki.centos.org/SpecialInterestGroup/Storage for more
# information
[centos-gluster38-source]
name=CentOS-$releasever - Gluster 3.8 Source
baseurl=http://vault.centos.org/centos/$releasever/storage/Source/gluster-3.8/
gpgcheck=1
enabled=1
View result.log
.
./out
./out/result.log
./hello
./hello/.git
./hello/.git/refs
./hello/.git/refs/heads
./hello/.git/refs/heads/master
./hello/.git/refs/tags
./hello/.git/refs/remotes
@hnakamur
hnakamur / openresty-luajit2-from-luajit-716f2daef8019ce53d75d2c376c74b8f478fd5c5.diff
Created Nov 24, 2016
diff from LuaJIT commit 716f2daef8019ce53d75d2c376c74b8f478fd5c5 to OpenResty LuaJIT fork v2.1-20161104
View openresty-luajit2-from-luajit-716f2daef8019ce53d75d2c376c74b8f478fd5c5.diff
diff -ruNb -x .git github.com/LuaJIT/LuaJIT/.gitignore github.com/openresty/luajit2/.gitignore
--- github.com/LuaJIT/LuaJIT/.gitignore 2015-12-09 18:52:43.000000000 +0900
+++ github.com/openresty/luajit2/.gitignore 2016-11-24 17:20:44.000000000 +0900
@@ -9,3 +9,6 @@
*.dmp
*.swp
.tags
+*~
+tags
+*.swo
@hnakamur
hnakamur / memo.md
Last active Nov 24, 2016
trafficserverのTSLuaのset_cache_lookup_urlとset_cache_urlのコードリーディング
View memo.md

trafficserver 6.2.0 のコードを読みました。 TSLua の set_cache_lookup_url と set_cache_url は基本的には同じことをしています。

が、URLをパースしたときのエラーを set_cache_lookup_url では処理していますが、 set_cache_url では処理していないので set_cache_lookup_url を使うのが良さそうです。

plugins/experimental/ts_lua/ts_lua_http.c#L295-L342

ts_lua_http_set_cache_lookup_url(lua_State *L)
{
You can’t perform that action at this time.