Skip to content

Instantly share code, notes, and snippets.

View 1d10t's full-sized avatar
❄️
winter in russian midland is longer than 1/2 of year

Serg 1d10t

❄️
winter in russian midland is longer than 1/2 of year
View GitHub Profile
@1d10t
1d10t / 0-install-termux.sh
Created April 11, 2026 13:36
termux-api Bluetooth SCO: build & test scripts
#!/usr/bin/env bash
# Download and install official Termux debug APK (signed with testkey_untrusted.jks).
#
# Required on a CLEAN device before installing our termux-api build.
# com.termux.api uses sharedUserId=com.termux — both apps must be signed
# with the same key. GitHub debug builds use the same key as our APK.
# F-Droid builds use a different key and will conflict.
#
# Run this script only if:
# - the device has no Termux installed, OR
@1d10t
1d10t / README.md
Last active April 8, 2026 13:09
macOS hev-socks5-tunnel: split-default routing wrapper + launchd autostart

macOS hev-socks5-tunnel: split-default routing + MapDNS + launchd autostart

A complete wrapper around hev-socks5-tunnel that turns it into a system-wide transparent SOCKS5 → TUN setup on macOS:

  • All TCP and UDP traffic is forwarded to a SOCKS5 proxy via a utun interface
  • Private RFC1918 networks bypass the tunnel and go via the physical gateway
  • The proxy host itself bypasses the tunnel (no routing loop)
  • DNS is handled by an in-tunnel MapDNS / fake-IP responder so QUIC and apps that ignore /etc/resolver use the tunnel transparently
@1d10t
1d10t / README.md
Last active April 7, 2026 21:59
macOS launchd watchdog: restarts Yggdrasil when peers drop after Wi-Fi reconnect

macOS net-watchdog for Yggdrasil

A tiny launchd watchdog for macOS that fixes a common Yggdrasil issue: after a Wi-Fi reconnect, the daemon stays alive but its outbound peers never come back, leaving the mesh-tunnel "up but dead".

The watchdog runs every 30 seconds and:

  1. Checks the Wi-Fi interface (en1 by default).
    • If it has a 169.254.x.x link-local address — runs ipconfig set en1 BOOTP/DHCP to renew the lease.
@1d10t
1d10t / .tmux.conf
Last active March 5, 2026 22:51
Kitty + tmux config for SSH/mosh clipboard (OSC 52) and Cyrillic keyboard layout support
# OSC 52 clipboard — ДО плагинов, чтобы не перезаписались
set -g set-clipboard on
set -g allow-passthrough on
set-option -sg terminal-overrides ",xterm-256color:Ms=\\E]52;c;%p2%s\\7"
# Copy-mode: при копировании отправлять через OSC 52 напрямую в клиентский TTY
set -g copy-command 'bash -c "printf \"\\033]52;c;%s\\007\" \"$(base64|tr -d \\\\n)\" > #{client_tty}"'
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'bash -c "printf \"\\033]52;c;%s\\007\" \"$(base64|tr -d \\\\n)\" > #{client_tty}"'
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'bash -c "printf \"\\033]52;c;%s\\007\" \"$(base64|tr -d \\\\n)\" > #{client_tty}"'
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'bash -c "printf \"\\033]52;c;%s\\007\" \"$(base64|tr -d \\\\n)\" > #{client_tty}"'
@1d10t
1d10t / tampermonkey-selected-text-tts.js
Last active October 11, 2025 08:38
Text-to-Speech для выделенного текста (с чанками)
// ==UserScript==
// @name Text-to-Speech для выделенного текста (с чанками)
// @namespace http://tampermonkey.net/
// @version 1.1
// @description Озвучивает выделенный текст на русском языке, разбивая его на чанки не более 1500 символов
// @author You
// @match *://*/*
// @grant none
// ==/UserScript==
@1d10t
1d10t / calculations.txt
Last active August 21, 2025 11:21
bicycle spoke length calculator
Front wheel
Lacing pattern 3 cross
Spokes 32
ERD 606
Axle Width 100
Left/Right Flange Diameter 58
Lock Nut to left flange 27.5
Left Flange to center 22.5
Right Flange to center 35.5
Lock nut to right flange 14.5
@1d10t
1d10t / 90-proxy-autoset
Last active June 24, 2025 10:39
ubuntu network manager dispatcher proxy auto setup
#!/bin/bash
# /etc/NetworkManager/dispatcher.d/90-proxy-autoset
IFACE="$1"
STATUS="$2"
USER_NAME="serg"
USER_ID=$(id -u "$USER_NAME")
run_as_user() {
sudo -u "$USER_NAME" \
# download google keyboards https://4pda.to/forum/index.php?showtopic=1065502&view=findpost&p=126275158
adb connect 192.168.43.96:5555
adb shell pm disable-user com.android.packageinstaller
adb install Google+Gboard.2.0.10.apk
adb shell ime list -a -s
adb shell ime enable com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME
adb shell ime set com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME
adb shell ime disable com.iqqi.watch_imeservice/com.iqqi.watch_inputmethod.IMEService
adb install Google+Gboard.2.5.07.apk
adb shell pm enable com.android.packageinstaller
# accelerometer_rotation: auto-rotation, 0 disable, 1 enable
# user_rotation: actual rotation, clockwise, 0 0°, 1 90°, 2 180°, 3 270°
adb connect 192.168.43.96:5555
adb shell settings put system accelerometer_rotation 0
adb shell settings put system user_rotation 0
@1d10t
1d10t / LetsEncrypt+certbot+UFW+postfix+dovecot.md
Created January 11, 2023 17:59 — forked from mrothNET/LetsEncrypt+certbot+UFW+postfix+dovecot.md
Let's Encrypt / Dovecot / Postfix / UFW firewall / Certbot

Let's Encrypt / Dovecot / Postfix / UFW firewall / Certbot

This tutorial describes how to install TLS to a mail server consisting of Postfix and/or Dovecot by using Let's Encrypt certificates with automatic renewing and firewall management.

The system used for this tutorial was:

$ lsb_release -idrc
Distributor ID: Ubuntu