Instantly share code, notes, and snippets.
I'm a Python developer with experience in creating Telegram bots and backend solutions using FastAPI. I also develop graphical interfaces and launchers.
- Russia
- 01:39
(UTC +03:00) - https://t.me/ergolyam
grisha765 /camera_ntfy.py
CreatedJuly 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. This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
#!/usr/bin/env -S uv run --script | |
# /// script | |
# dependencies = ["httpx", "pyftpdlib"] | |
# /// | |
importos | |
importmimetypes | |
importtempfile | |
importlogging | |
logging.basicConfig( |
grisha765 /dump_tree_to_md.py
Last activeJuly 18, 2025 17:54
Recursive saving of file contents from a directory in Markdown format This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
importargparse | |
importfnmatch | |
frompathlibimportPath | |
fromtypingimportList,Optional,Union | |
try: | |
frompathspecimportPathSpec | |
_HAS_PATHSPEC=True |
grisha765 /pipefinder.sh
CreatedJune 19, 2025 14:54
Script for automated audio capture from Firefox to Telegram Desktop This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
SLEEP_SEC=2 | |
intercepted=false | |
declare -a LINKS_DONE=() | |
cleanup() { | |
echo"Resetting – removing PipeWire links ..." | |
for((i=0; i<${#LINKS_DONE[@]}; i+=2));do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
#!/usr/bin/env -S uv run --script | |
# /// script | |
# dependencies = [ "pyrofork", "tgcrypto-pyrofork" ] | |
# /// | |
importsys | |
frompathlibimportPath | |
frompyrogram.clientimportClient |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
# MikroTik Script: 6in4.rsc | |
# Purpose: Update PPPoe IP dynamically | |
:local apiKey "api_key" | |
:local tunnelId "tunnel_id" | |
:local fileName "last_pppoe_ip2.txt" | |
:local lastIP | |
:local currentIP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
@echooff | |
setlocalenabledelayedexpansion | |
set"current_dir=%~dp0" | |
set"found_folder=" | |
for /d%%din ("%current_dir%WPy64*")do ( | |
ifexist"%%d" ( | |
set"found_folder=%%d" | |
goto :folder_found |
grisha765 /add-ppa.sh
CreatedNovember 24, 2024 21:12
Script that adds a ppa repository on any deb based distribution This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
#!/bin/bash | |
NM=`uname -a&& date` | |
NAME=`echo$NM| md5sum| cut -f1 -d""` | |
if [$#-eq 1 ];then | |
ppa_name=`echo"$1"| cut -d":" -f2 -s` | |
if [-z"$ppa_name" ];then | |
echo"PPA name not found" | |
echo"Utility to add PPA repositories in your debian machine" | |
echo"$0 ppa:user/ppa-name" | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
# MikroTik Script: freedomain.rsc | |
# Purpose: Update DNS records dynamically | |
:local apiKey "api_key" | |
:local domain "example.com,example.org" | |
:local fileName "last_pppoe_ip.txt" | |
:local lastIP | |
:local currentIP |
- Подключаем феш накопитель к mikrotik и форматируем его в ext4.Легче всего это сделать через winbox
- Заходим в
System > Disks > Format drive
- Выбираем slot
usb1
и file systemext4
, и нажимаем start. - Ждём пока кнопка start снова не станет доступной.
- Когда стала доступной то всё готово.
- Нужно установить пакет
container
.
- Заходим на сайтSoftware Packages