Skip to content

Instantly share code, notes, and snippets.

View pejotes's full-sized avatar
💁

Pawel Stefanski pejotes

💁
  • Poznan/Poland
View GitHub Profile
@pejotes
pejotes / esp32_ttgo_t5_213.yaml
Created October 23, 2025 12:29 — forked from TheGroundZero/esp32_ttgo_t5_213.yaml
TTGO T5 v2.3.1 2.13" display in ESPHome
# Board
# https://s.click.aliexpress.com/e/_9IDl91
# ESPHome docs:
# - https://esphome.io/components/display/waveshare_epaper.html
# - https://esphome.io/components/spi.html#spi
# - https://esphome.io/components/display/index.html#formatted-text
substitutions:
esphome_name: esp32_ttgo_t5
@pejotes
pejotes / encrypt_pdf.py
Created April 17, 2025 08:27
encrypt pdf
#!/usr/bin/python3
import os
import sys
from PyPDF2 import PdfReader, PdfWriter
def encrypt_pdf(filename, user_password="12345678", owner_password="12345678"):
"""
Encrypt a PDF file to prevent copying/printing and optionally require a password to open.
@pejotes
pejotes / measure_handshake.py
Created March 6, 2025 15:36
measure_handshake.py
"measure_handshake.py" 39L, 1486B 39,64 All
import socket
import ssl
import time
import sys
import argparse
def measure_handshake(host, port, iterations=10):
times = []
for i in range(iterations):
import boto3
import time
import datetime
from dateutil import parser
import botocore.exceptions
from colorama import init, Fore, Style
from rich.console import Console
from rich.table import Table
from rich.panel import Panel
from rich.progress import Progress, SpinnerColumn, TextColumn
import requests
from requests.exceptions import RequestException
import hashlib
import json
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
class ZTERouter:
def __init__(self, ip, username, password):
self.ip = ip
{
"state": "active+undersized+degraded",
"snap_trimq": "[]",
"epoch": 94387,
"up": [
261,
695
],
"acting": [
261,

Keybase proof

I hereby claim:

  • I am pejotes on github.
  • I am pejotes (https://keybase.io/pejotes) on keybase.
  • I have a public key ASAqY3MurgWkn6XOx-9pYgMn-1m9snfsH20dsrR_sRJGcQo

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am pejotes on github.
* I am pejotes (https://keybase.io/pejotes) on keybase.
* I have a public key whose fingerprint is 51C9 EBA9 AE44 823A B8C8 B1F2 9216 5A1F 8C6D 3565
To claim this, I am signing this object: