Skip to content

Instantly share code, notes, and snippets.

View ivan4th's full-sized avatar

Ivan Shvedunov ivan4th

  • Spacemesh
  • Yerevan, Armenia
  • 21:02 (UTC +04:00)
View GitHub Profile
@ivan4th
ivan4th / print-sched.txt
Created February 3, 2017 19:33
kube-proxy-print-sched
runtime.usleep () at /usr/local/go/src/runtime/sys_linux_amd64.s:95
95 /usr/local/go/src/runtime/sys_linux_amd64.s: No such file or directory.
(gdb) print-sched
G state:
1 waiting (chan receive)
started at runtime.main
created by runtime.rt0_go
2 waiting (force gc (idle))
started at runtime.forcegchelper
created by runtime.init.3
@ivan4th
ivan4th / gist:9d8ecc7408a5a68e3074ca48f7b62598
Created August 5, 2018 11:10
digital ocean dns + letsencrypt + docker
$ cat letsencrypt/do.ini
dns_digitalocean_token = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
$ docker run -it --rm --name certbot \
-v "$PWD/letsencrypt:/etc/letsencrypt" \
-v "$PWD/letsencrypt-data:/var/lib/letsencrypt" \
-v "$PWD/letsencrypt-out:/keys" \
certbot/dns-digitalocean \
certonly \
--server https://acme-staging-v02.api.letsencrypt.org/directory \
--dns-digitalocean \
$ sed 's@\bSERVICE_apache\b@/opt/apache/bin@g'
SERVICE_apache QQQ
/opt/apache/bin QQQ
QQQ SERVICE_apache ZZZ
QQQ /opt/apache/bin ZZZ
SERVICE_apachehuyache
SERVICE_apachehuyache
FOOSERVICE_apache
FOOSERVICE_apache
@ivan4th
ivan4th / description.md
Last active August 13, 2018 23:02
password decryptor for kustomize

keys.gpg is an encrypted file with key-value pairs like this:

# TEST_KEY is "foobar" (base64-encoded)
TEST_KEY="Zm9vYmFy"

values are base64-encoded

Usage in kustomization.yaml:

secretGenerator:
@ivan4th
ivan4th / output.txt
Created February 28, 2019 23:15
whois 92.53.91.113
% IANA WHOIS server
% for more information on IANA, visit http://www.iana.org
% This query returned 1 object
refer: whois.ripe.net
inetnum: 92.0.0.0 - 92.255.255.255
organisation: RIPE NCC
status: ALLOCATED
@ivan4th
ivan4th / config.boot
Last active April 16, 2023 05:32
Anti-censorship EdgeRouter X setup
firewall {
all-ping enable
broadcast-ping disable
group {
address-group CV {
address 195.82.146.0/24
}
}
ipv6-receive-redirects disable
ipv6-src-route disable
@ivan4th
ivan4th / tmux.conf
Created September 28, 2019 06:24
tmux on mac
# http://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
unbind C-b
set -g prefix C-a
bind C-a send-prefix
set -g mouse on
# https://gist.github.com/miguelmota/71ab27e1ec2c80759d8ea975b8ec855b
# bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# bind-key -T copy-mode MouseDragEnd1Pane send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "pbcopy"
@ivan4th
ivan4th / README.md
Last active October 30, 2019 15:17
modem signal check

Build:

GOOS=linux GOARCH=mipsle CGO_ENABLED=0 GOMIPS=softfloat go build
@ivan4th
ivan4th / killemall.el
Last active November 12, 2020 10:00
Kill Emacs buffers by path
;; based on https://stackoverflow.com/a/32823597
(defun killemall (regexp)
(interactive "sKill buffers with paths matching this regexp: ")
(dolist (buffer (buffer-list))
(let ((name (or (buffer-file-name buffer)
(with-current-buffer buffer
(when (boundp 'dired-directory)
(if (consp dired-directory)
(car dired-directory)
@ivan4th
ivan4th / Dockerfile
Created March 15, 2021 16:03
VPP UDP Test
FROM upg:debug
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -y libssl-dev git curl wget iproute2 dumb-init gdb \
nginx gnupg apt-transport-https netcat tcpdump ethtool socat
COPY start.sh /
COPY test.sh /