Skip to content

Instantly share code, notes, and snippets.

View Kuzmenko-Pavel's full-sized avatar

Pavel Kuzmenko Kuzmenko-Pavel

  • Prozorro Sale
  • Ukraine Kharkiv
  • 21:57 (UTC +02:00)
View GitHub Profile
@Kuzmenko-Pavel
Kuzmenko-Pavel / ReadingHelmResources.md
Last active May 10, 2024 08:29 — forked from DzeryCZ/ReadingHelmResources.md
Decoding Helm3 resources in secrets

Helm 3 is storing description of it's releases in secrets. You can simply find them via

$ kubectl get secrets
NAME                                                TYPE                                  DATA   AGE
sh.helm.release.v1.wordpress.v1                     helm.sh/release.v1                    1      1h

If you want to get more info about the secret, you can try to describe the secret

$ kubectl describe secret sh.helm.release.v1.wordpress.v1
@Kuzmenko-Pavel
Kuzmenko-Pavel / move-var-part-ubuntu.md
Created January 27, 2024 15:09 — forked from iambryancs/move-var-part-ubuntu.md
Move /var to another partition in Ubuntu

Move /var to another partition in Ubuntu

Create partition with fdisk or gparted

fdisk /dev/sdb
...
...

Create fs

@Kuzmenko-Pavel
Kuzmenko-Pavel / postgres
Created December 20, 2019 15:29 — forked from mmrwoods/postgres
Postgres maintenance crontab file
# dump all databases once every 24 hours
45 4 * * * root nice -n 19 su - postgres -c "pg_dumpall --clean" | gzip -9 > /var/local/backup/postgres/postgres_all.sql.gz
# vacuum all databases every night (full vacuum on Sunday night, lazy vacuum every other night)
45 3 * * 0 root nice -n 19 su - postgres -c "vacuumdb --all --full --analyze"
45 3 * * 1-6 root nice -n 19 su - postgres -c "vacuumdb --all --analyze --quiet"
# re-index all databases once a week
0 3 * * 0 root nice -n 19 su - postgres -c 'psql -t -c "select datname from pg_database order by datname;" | xargs -n 1 -I"{}" -- psql -U postgres {} -c "reindex database {};"'
@Kuzmenko-Pavel
Kuzmenko-Pavel / proxy.py
Created February 21, 2018 16:45 — forked from scturtle/proxy.py
use opera's built-in VPN as proxy
#!/usr/bin/env python3
import asyncio
from vpn import get_proxy
proxy = port = auth = None
pool = asyncio.Queue(5)
psize = 0
async def process_client(client_reader, client_writer, *, CHUNK=4096):
global psize