Skip to content

Instantly share code, notes, and snippets.

Avatar
❄️
NO SNOW, NO LIFE.

Teppei Yano yano3

❄️
NO SNOW, NO LIFE.
View GitHub Profile
@yano3
yano3 / gist:1378948
Created Nov 19, 2011
git commit --amend --reset-author
View gist:1378948
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
git config --global user.name "Your Name"
git config --global user.email you@example.com
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
@yano3
yano3 / about_elasticsearch_cluster.md
Last active Sep 28, 2020
Elasticsearch クラスタ概説
View about_elasticsearch_cluster.md
View favicon.js
$(function() {
$("link[rel='shortcut icon']").remove();
$('head').append('<link rel="icon" type="image/png" href="https://img12.shop-pro.jp/PA01067/242/etc/kagura_meat_sauce.png?cmsp_timestamp=20200202124717">');
$('head').append('<link rel="apple-touch-icon" href="https://img12.shop-pro.jp/PA01067/242/etc/kagura_meat_sauce.png?cmsp_timestamp=20200202124717">');
});
View gist:b98f613d76643d537b9ae04799220750
==> Caveats
You need to manually run setup_dirs to create directories required by nodebrew:
/usr/local/opt/nodebrew/bin/nodebrew setup_dirs
Add path:
export PATH=$HOME/.nodebrew/current/bin:$PATH
To use Homebrew's directories rather than ~/.nodebrew add to your profile:
export NODEBREW_ROOT=/usr/local/var/nodebrew
View gist:60670277a4c3f2db6da84eeb2cc515e1
convert orig_2560_1280.png -alpha activate -virtual-pixel transparent -distort arc "32 0 5000 3773" out.png
View monitoring_elasticsearch.md

moved to https://github.com/yano3/kankara/blob/master/elasticsearch/monitoring.md

Monitoring Elasticsearch

APIs

  • Elasticsearch の様子を知るのに便利な様々な API がある。
  • これらを参照する Elasticsearch プラグインや各種モニタリングツール (mackerel, munin, etc.) のプラグインが開発されている。
  • API 間で重複する内容があったり、似ているようで異なるものがあったりするので使い分けに注意。
View gist:da50ee86d410af91b3557535477dfd9f
cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -g -O2 -fdebug-prefix-map=/usr/local/src/nginx-1.13.10=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC -I src/c
ore -I src/event -I src/event/modules -I src/os/unix -I /usr/local/src/ngx_mruby/mruby/src -I /usr/local/src/ngx_mruby/mruby/include -I -g -I -std=gnu99 -I -O3 -I -Wall -I -Werror-implicit-function-declaration -I -Wdeclaration-after-statement -I -Wwrite-strings -I -fPIE -
I -I/usr/local/src/ngx_mruby/mruby/include -I -I/usr/local/src/ngx_mruby/mruby/build/mrbgems/mruby-pointer/include -I -I/usr/local/include -I /usr/local/src/ngx_mruby/dependence/ngx_devel_kit/objs -I objs/addon/ndk -I objs -I src/http -I src/http/modules -I src/http/v2 -I
/usr/local/src/ngx_mruby/dependence/ngx_devel_kit/src -I src/mail -I src/stream \
View gcc4.4.md
$ gcc -c -fPIE -fPIC fuga.c -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)
COLLECT_GCC_OPTIONS='-c' '-fPIE' '-fPIC' '-v' '-mtune=generic'
 /usr/libexec/gcc/x86_64-redhat-linux/4.4.7/cc1 -quiet -v fuga.c -quiet -dumpbase fuga.c -mtune=generic -a
View gcc4.8.md
$ gcc -c -fPIE -fPIC fuga.c -v
Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)
COLLECT_GCC_OPTIONS='-c' '-fPIC' '-v' '-mtune=generic' '-march=x86-64'
@yano3
yano3 / fix_vboxsf.md
Created Oct 4, 2017
fix vboxsf error when updating kernal
View fix_vboxsf.md
sudo /opt/VBoxGuestAdditions-5.0.16/init/vboxadd setup

on older box

sudo /etc/init.d/vboxadd setup