Skip to content

Instantly share code, notes, and snippets.

View yano3's full-sized avatar
❄️
NO SNOW, NO LIFE.

Teppei Yano yano3

❄️
NO SNOW, NO LIFE.
View GitHub Profile
@yano3
yano3 / gist:1378948
Created November 19, 2011 15:17
git commit --amend --reset-author
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
$ trivy image --ignore-unfixed --severity HIGH,CRITICAL --vuln-type library ruby:2.7.5
2022-07-26T19:10:10.109+0900 INFO Vulnerability scanning is enabled
2022-07-26T19:10:10.109+0900 INFO Secret scanning is enabled
2022-07-26T19:10:10.109+0900 INFO If your scanning is slow, please try '--security-checks vuln' to disable secret scanning
2022-07-26T19:10:10.109+0900 INFO Please see also https://aquasecurity.github.io/trivy/0.30.3/docs/secret/scanning/#recommendation for faster secret detection
2022-07-26T19:10:10.127+0900 INFO Number of language-specific files: 1
2022-07-26T19:10:10.127+0900 INFO Detecting gemspec vulnerabilities...
2022-07-26T19:10:10.130+0900 INFO Table result includes only package filenames. Use '--format json' option to get the full path to the package file.
Ruby (gemspec)
@yano3
yano3 / about_elasticsearch_cluster.md
Last active September 28, 2020 07:52
Elasticsearch クラスタ概説
@yano3
yano3 / favicon.js
Last active February 2, 2020 09:44
$(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">');
});
==> 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
convert orig_2560_1280.png -alpha activate -virtual-pixel transparent -distort arc "32 0 5000 3773" out.png

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

Monitoring Elasticsearch

APIs

  • Elasticsearch の様子を知るのに便利な様々な API がある。
  • これらを参照する Elasticsearch プラグインや各種モニタリングツール (mackerel, munin, etc.) のプラグインが開発されている。
  • API 間で重複する内容があったり、似ているようで異なるものがあったりするので使い分けに注意。
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 \
$ 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
$ 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'