Skip to content

Instantly share code, notes, and snippets.

View hit0ri's full-sized avatar
🐧

Taras Dyshkant hit0ri

🐧
View GitHub Profile
docker run --rm -t -p 127.0.0.1:8080:80 traefik/whoami
docker run --rm -t -p 127.0.0.1:8080:9376 registry.k8s.io/serve_hostname
@hit0ri
hit0ri / wireguard-server-user-data.md
Created October 28, 2023 16:53
WireGuard server setup (user-data)
DEBIAN_FRONTEND=noninteractive apt-get update -qq
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y -qq
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq wireguard
curl -fsSL https://get.docker.com | sh
gpasswd -a ubuntu docker
sed -i 's|//Unattended-Upgrade::Remove-Unused-Dependencies.*$|Unattended-Upgrade::Remove-Unused-Dependencies "true";|' /etc/apt/apt.conf.d/50unattended-upgrades
sed -i 's|\("^linux-image.*\)|//\1|' /etc/apt/apt.conf.d/01autoremove

cat > /etc/systemd/system/wg-gen-web.path <<-EOF
@hit0ri
hit0ri / perf-in-60.sh
Created October 7, 2021 16:44
perf analysis in 60 seconds
w
dmesg -exL
vmstat 1
mpstat -P ALL 1
pidstat 1
iostat -xz 1
free -h
sar -n DEV 1
sar -n TCP,ETCP 1
top
@hit0ri
hit0ri / keybase.md
Created July 30, 2021 08:03
keybase.md

Keybase proof

I hereby claim:

  • I am hit0ri on github.
  • I am hit0ri (https://keybase.io/hit0ri) on keybase.
  • I have a public key ASAFxDE4d6bD-uf2l9Sms6h5h6sxhnNtc_2XnMv3l7ZkmAo

To claim this, I am signing this object:

@hit0ri
hit0ri / SETTINGS.txt
Created June 4, 2019 13:48
cat ~/.local/share/fonts/Input/SETTINGS.txt
INPUT
SETTINGS
These fonts have been customized with the settings below. You can further customize
your fonts with the inputCustomize.py command-line tool found in this package, or
by re-downloading the fonts at <http://input.fontbureau.com/download>.
Four Style Family
Regular: InputMono-Regular.ttf
@hit0ri
hit0ri / autoexec.cfg
Last active March 1, 2019 13:57
cs1.6 config
rate 25000
cl_updaterate 100
cl_cmdrate 100
ex_interp .1
_cl_autowepswitch 0
_snd_mixahead .1
brightness 2
cl_allowdownload 1
cl_crosshair_color "255 228 181"
@hit0ri
hit0ri / docker-compose.yml
Last active October 19, 2018 07:41
traefik path ip whitelist
version: '3'
services:
proxy:
image: traefik
command:
- --docker
- --api
ports:
@hit0ri
hit0ri / Dockerfile-ai
Created October 17, 2018 05:25
find3 docker compose
FROM python:alpine
RUN apk add --no-cache lapack libstdc++ freetype \
&& apk add --no-cache --virtual .build build-base gfortran freetype-dev lapack-dev
WORKDIR /usr/src/app
COPY find3/server/ai .
RUN pip3 install --no-cache-dir scipy \
&& pip3 install --no-cache-dir -r requirements.txt \
&& apk del .build
WORKDIR /usr/src/app/src
ENV LC_ALL=C.UTF-8 LANG=C.UTF-8 FLASK_APP=server.py FLASK_DEBUG=0
@hit0ri
hit0ri / perf-in-60s.md
Last active October 11, 2018 10:14
performance analysis in 60s

Host perf analysis in 60s

https://youtu.be/89fYOo1V2pA?t=2543

  1. load averages: w or uptime
  2. kernel errors: dmesg -xTL | tail
  3. overall stats by time: vmstat 1
  4. CPU balance: mpstat -P ALL 1
  5. process usage: pidstat 1
  6. disk I/O: iostat -xz 1
@hit0ri
hit0ri / chanhopper.sh
Last active August 8, 2018 14:26
Wi-Fi channel hopper
#!/bin/bash
msg() {
printf -- '%s\n' "$@"
}
err() {
printf -- 'error: %s\n' "$@" >&2
exit 1
}