Skip to content

Instantly share code, notes, and snippets.

Avatar
❄️
NO SNOW, NO LIFE.

Teppei Yano yano3

❄️
NO SNOW, NO LIFE.
View GitHub Profile
View gist:78cb494fa4783ba2a2bd82b18d2777c9
$ 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)
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 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
@yano3
yano3 / gist:aea70b83a7789479839de0b4c12d7d71
Created Feb 2, 2017
brew install docker-machine-driver-xhyve
View gist:aea70b83a7789479839de0b4c12d7d71
This driver requires superuser privileges to access the hypervisor. To
enable, execute
sudo chown root:wheel /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chmod u+s /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
View brew install bison
==> Downloading https://homebrew.bintray.com/bottles/bison-3.0.4.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring bison-3.0.4.el_capitan.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
Some formulae require a newer version of bison.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your