Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Search Gists
Sign in Sign up

Instantly share code, notes, and snippets.

View grisha765's full-sized avatar

Grisha grisha765

I'm a Python developer with experience in creating Telegram bots and backend solutions using FastAPI. I also develop graphical interfaces and launchers.
View GitHub Profile
@grisha765
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.
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = ["httpx", "pyftpdlib"]
# ///
importos
importmimetypes
importtempfile
importlogging
logging.basicConfig(
@grisha765
grisha765 /dump_tree_to_md.py
Last activeJuly 18, 2025 17:54
Recursive saving of file contents from a directory in Markdown format
#!/usr/bin/env python3
importargparse
importfnmatch
frompathlibimportPath
fromtypingimportList,Optional,Union
try:
frompathspecimportPathSpec
_HAS_PATHSPEC=True
@grisha765
grisha765 /pipefinder.sh
CreatedJune 19, 2025 14:54
Script for automated audio capture from Firefox to Telegram Desktop
#!/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
@grisha765
grisha765 /get_tg_session.py
Last activeJuly 18, 2025 17:23
Script to get string telegram session
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = [ "pyrofork", "tgcrypto-pyrofork" ]
# ///
importsys
frompathlibimportPath
frompyrogram.clientimportClient
@grisha765
grisha765 /6in4.rsc
CreatedDecember 22, 2024 01:14
6in4 update Dyn IP with api for mikrotik
# 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
@grisha765
grisha765 /WinPY.bat
CreatedDecember 9, 2024 16:14
Portable python for windows with WinPY
@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
grisha765 /add-ppa.sh
CreatedNovember 24, 2024 21:12
Script that adds a ppa repository on any deb based distribution
#!/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
@grisha765
grisha765 /freedomain.rsc
Last activeNovember 17, 2024 00:35
freedomain DynDNS for mikrotik
# 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
@grisha765
grisha765 /mikrotik_byedpi.md
Last activeJuly 16, 2025 12:41
ByeDPI on MikroTik

Подготовка

  1. Подключаем феш накопитель к mikrotik и форматируем его в ext4.Легче всего это сделать через winbox
  • Заходим вSystem > Disks > Format drive
  • Выбираем slotusb1 и file systemext4, и нажимаем start.
  • Ждём пока кнопка start снова не станет доступной.
  • Когда стала доступной то всё готово.
  1. Нужно установить пакетcontainer.

[8]ページ先頭

©2009-2025 Movatter.jp