Skip to content

Instantly share code, notes, and snippets.

@mrAlexZT
mrAlexZT / mikotik-youtube.MD
Created March 8, 2025 16:07 — forked from degritsenko/mikotik-youtube.MD
Route youtube traffic via VPN with Mikrotik / Форвард youtube в туннель на mirotik

Должен быть настроен DOH

Этап 0. Аренуем VPS, настраиваем туннель с роутером. Проще всего wireguard

Этап 1. Создаем таблицу маршрутизации

/routing table add disabled=no fib name=xoxo
@mrAlexZT
mrAlexZT / youtube_to_mp3_splitter.py
Created November 7, 2024 16:25 — forked from marjanmo/youtube_to_mp3_splitter.py
Download Youtube music compilation into separate .mp3 files
import subprocess
import sys, os
"""
#####################################
##### YOUTUBE TO MP3 SPLITTER ######
#####################################
@mrAlexZT
mrAlexZT / gist:667ae95b4e8a4519cc1a2d83179693dc
Created April 18, 2021 12:58 — forked from nikbucher/gist:9687112
Groovy convert bytes from and to human readable
Long base = 1024L
Integer decimals = 3
def prefix = ['', 'K', 'M', 'G', 'T']
def pattern = ~/(\d*(?:\.\d{0,$decimals})?)([${prefix.join('')}])?[B]?/
def toBytes = { String sizeText ->
def m = sizeText.trim().toUpperCase() =~ pattern
if(m.matches()) {
def bytes = new BigDecimal(m.group(1)) * (m.group(2) ? base**prefix.indexOf(m.group(2)) : 1)
return bytes.setScale(0, BigDecimal.ROUND_HALF_UP) as Long
@mrAlexZT
mrAlexZT / cloudflare-delete-all-records.sh
Last active April 15, 2021 14:19 — forked from slayer/cloudflare-delete-all-records.sh
Delete all DNS records for specified zone
#!/bin/bash
ZONE_ID=11111111111111111111111111
API_TOKEN=2222222222222222222222222
read -p "Are you sure to DELETE ALL records for zone? " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
curl --silent -X GET \
@mrAlexZT
mrAlexZT / docker-cleanup-resources.md
Created March 31, 2018 09:50 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm