Skip to content

Instantly share code, notes, and snippets.

View okurka12's full-sized avatar
♥️

Vít Pavlík okurka12

♥️
View GitHub Profile
@okurka12
okurka12 / get-words.sh
Created September 26, 2025 00:30
get list of words in a python file
#!/bin/bash
#
# sudo apt install aspell aspell-cs
#
# takes around 10 s to run
#
FILE=words.py
# $!s each line except last one
@okurka12
okurka12 / RUNREXX.jcl
Created September 4, 2025 10:15
JCL to run rexx script as a job (output to spool)
//*
//* run a rexx script as a job (output to spool)
//*
//*
//RXTEST JOB 'REXX SCRIPT',CLASS=A,MSGCLASS=X
//* ^ specify job name here
//*
//STEP1 EXEC PGM=IKJEFT01,DYNAMNBR=20
//SYSTSPRT DD SYSOUT=*
//*
@okurka12
okurka12 / lqip.js
Created August 26, 2025 22:20
low-quality image placeholder
/* low-quality image placeholder */
/* author: Vit Pavlik, August 2025 */
/* succesfully deployed on https://vitapavlik.cz/fekt_mapa */
const levels = [
"static/img-lowest/",
"static/img-lower/",
"static/img-moderate/"
]
function img_upgrade_quality(event) {
@okurka12
okurka12 / wg0.conf
Last active August 18, 2025 22:03
Wireguard server config for servers with IPv6 connectivity (with instructions)
#
# WIREGUARD SERVER CONFIG FOR SERVERS WITH IPV6
# ---------------------------------------------
#
# date of creation: february 2025
# updated: august 2025
# file name: /etc/wireguard/wg0.conf
# file mode: 600 - important! keys are stored here!!!
#
# prerequisites:
@okurka12
okurka12 / disable-password-auth.md
Last active August 10, 2025 15:13
Disable SSH password authentication on Debian

Enable key-only SSH authentication

Caution

Only do this AFTER you verified you can authenticate with you SSH key.

Open the config file:

sudo nano /etc/ssh/sshd_config
@okurka12
okurka12 / farewell.html
Created August 2, 2025 01:36
dark, sad landing page to replace your discontinued website
<!DOCTYPE html>
<html lang="en">
<head>
<!-- credits to chatgpt -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Farewell</title>
<style>
body {
@okurka12
okurka12 / install-postgres.md
Created May 7, 2025 09:20
Instructions for installing and running PostgreSQL locally

How to install + setup PostgreSQL (on Debian Linux)

Following steps are for starting a PostgreSQL database locally on your machine and accessing it as a postgres user.

Install the package

sudo apt install postgresql

  • note down the version with psql --version
@okurka12
okurka12 / video-to-gif.sh
Created May 6, 2025 08:38
convert mp4 video to gif and optionally remove green background
#!/bin/bash
#
# convert mp4 video to gif and optionally remove green background
#
# created: early 2025
# ffmpeg version 5.1.6-0+deb12u1
# ImageMagick 6.9.11-60
@okurka12
okurka12 / generate-gpg-keypair.sh
Last active July 14, 2025 17:59
a small wrapper around gpg --full-generate-key
#!/bin/bash
#
# Generate a key-pair of PGP keys using gpg
# -----------------------------------------
# ...a small wrapper around gpg
# ...date of creation: April 2025
# ...author: okurka12
#
#
# How it works
@okurka12
okurka12 / test-tcp-stream.py
Created April 13, 2025 13:49
test for IPK25chat client TCP stream
#
# IPK25chat client TCP stream test
# author: vita v22.0
# date: 13. 4. 2025
# python 3.13.0
#
import socket
ADDRESS = "127.0.0.1"
PORT = 4567