Skip to content

Instantly share code, notes, and snippets.

View ergolyam's full-sized avatar

ergolyam ergolyam

View GitHub Profile
@ergolyam
ergolyam / void_install.md
Last active March 7, 2026 15:10
Гайд по установке void linux на uefi

Установка void linux

Разметка

  • Загрузите образ Live и войдите в систему.

  • Создайте два раздела в cfdisk:

    • /dev/sdX1 - для efi 100M (Type: EFI System)
    • /dev/sdX2 - для root весь диск (Type: Linux filesystem)
@ergolyam
ergolyam / vless-guide.md
Last active March 17, 2026 02:47
Развёртывание VLESS (Reality) на VPS с маскировкой под свой сайт

Развёртывание VLESS (Reality) на VPS с маскировкой под свой сайт

Инструкция поднимает связку 3x-ui + Xray (VLESS/Reality) в podman-контейнерах, с Nginx как маскировкой под реальный TLS-сайт и с автоматическим обновлением сертификатов.

Панель 3x-ui остаётся доступной только через SSH-туннель (без публикации в интернет).

Везде, где указано example.com, подставьте свой домен.

Содержание

@ergolyam
ergolyam / touchscreen-pad.py
Last active October 3, 2025 13:35
script that turns a touchscreen into a touchpad
#!/usr/bin/env python3
import argparse
import time
import math
import logging
from dataclasses import dataclass
from typing import Optional, Dict, Tuple, List
from evdev import InputDevice, UInput, ecodes as E
@ergolyam
ergolyam / chatgpt-to-md.js
Last active September 12, 2025 21:19
Save current ChatGPT dialog (user + assistant) as a .md file via the Tampermonkey menu.
// ==UserScript==
// @name ChatGPT → Markdown saver
// @namespace tgpt.chat.markdown.saver
// @version 1.3
// @description Save current ChatGPT dialog (user + assistant) as a .md file via the Tampermonkey menu.
// @match https://chatgpt.com/*
// @match https://chat.openai.com/*
// @match http*://*/* // lets you run this on mirrors/embeds too (menu-only, harmless)
// @match file:///* // saved HTML files
// @grant GM_registerMenuCommand
@ergolyam
ergolyam / tg_uploader.py
Last active September 7, 2025 22:36
script for sending files from stdin to Telegram using mtproto
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = [ "pyrofork", "tgcrypto-pyrofork", "rich", "pysocks" ]
# ///
import argparse
import asyncio
import io
import math
import os
@ergolyam
ergolyam / update_spaceship.sh
Last active October 24, 2025 16:47
This custom updater integrates OpenWrt’s `ddns-scripts` with Spaceship.dev DNS.
#!/bin/sh
API_KEY="$api_key"
API_SECRET="$api_secret"
FQDN="$domain"
ADDR="$__IP"
TTL=3600
WAIT="${param_wait:-8}"
DNS="${dns_server:-1.1.1.1}"
@ergolyam
ergolyam / camera_ntfy.py
Created July 18, 2025 15:03
A script for automatically sending photos from a camera via FTP, created for cameras that send photos to an FTP server.
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = ["httpx", "pyftpdlib"]
# ///
import os
import mimetypes
import tempfile
import logging
logging.basicConfig(
@ergolyam
ergolyam / dump_tree_to_md.py
Last active July 18, 2025 17:54
Recursive saving of file contents from a directory in Markdown format
#!/usr/bin/env python3
import argparse
import fnmatch
from pathlib import Path
from typing import List, Optional, Union
try:
from pathspec import PathSpec
_HAS_PATHSPEC = True
@ergolyam
ergolyam / pipefinder.sh
Last active January 15, 2026 23:41
Script for automated audio capture from Firefox to Telegram Desktop
#!/usr/bin/env bash
set -euo pipefail
SLEEP_SEC=2
OUTPUT_APP=""
INPUT_APP=""
declare -A LINKS_DONE=()
usage() {
cat <<EOF
@ergolyam
ergolyam / get_tg_session.py
Last active July 18, 2025 17:23
Script to get string telegram session
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = [ "pyrofork", "tgcrypto-pyrofork" ]
# ///
import sys
from pathlib import Path
from pyrogram.client import Client