Skip to content

Instantly share code, notes, and snippets.

View johnarok's full-sized avatar

johnarok

View GitHub Profile
@johnarok
johnarok / filewatchers.txt
Last active March 1, 2019 15:39
K8S-Misc
File watchers
find /proc/*/fd -type l -lname '*inotify' -print 2>/dev/null \
> | cut -d / -f 3 | (while read pid; do ps --no-headers -p $pid -o user,command; done) \
> | sort | uniq -c
1 dbus /bin/dbus-daemon
2 polkitd /usr/lib/polkit-1/polkitd
1 root /usr/bin/abrt-watch-log
5 root /usr/bin/kubelet
@johnarok
johnarok / k8s-centos7-containerd-cilium.md
Last active March 26, 2019 16:25
k8s-centos7-containerd-cilium
setenforce 0
sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config
systemctl stop firewalld
systemctl disable firewalld
yum install wget
cp /home/vagrant/CACerts/* /etc/pki/ca-trust/source/anchors/
@johnarok
johnarok / k8s-ubuntu-containerd-cilium.md
Last active February 16, 2019 19:19
k8s-ubuntu-containerd-cilium

Install System Packages

apt-get update && apt-get install -y apt-transport-https curl
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update && apt-get install -y kubelet=1.13.3-00 kubeadm=1.13.3-00  kubectl=1.13.3-00
@johnarok
johnarok / terminal-cheatsheet.md
Created January 6, 2019 03:30
terminal-cheatsheet

Screentshot scrot -q 90 -s destination.jpg

@johnarok
johnarok / xrandr-cheatsheet.md
Created January 6, 2019 00:00
xrandr-cheatsheet
xrandr --output Virtual1 --mode 1440x900 
xrandr --output eDP1 --scale 1.25x1.25 # gist
xrandr --output Virtual1 --dpi 166 #optional
@johnarok
johnarok / certs-cheatsheet.md
Last active January 2, 2019 22:26
certs-cheatsheet

Install CA root cert in Ubuntu

    sudo mkdir /usr/share/ca-certificates/extra
    sudo cp foo.crt /usr/share/ca-certificates/extra/foo.crt # Copy the CA .crt file to this directory:
    sudo update-ca-certificates --fresh # will add the .crt file's path to /etc/ca-certificates.conf
    sudo dpkg-reconfigure ca-certificates # for debug and ux

In case of a .pem file on Ubuntu, it must first be converted to a .crt file:

@johnarok
johnarok / i3-lxqt-config.sh
Created January 2, 2019 18:55
i3-lxqt config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@johnarok
johnarok / youversionlinks.sql
Created December 31, 2018 20:48
Bible Youversion links sql