Skip to content

Instantly share code, notes, and snippets.

View cofob's full-sized avatar
🏳️‍🌈

Egor Ternovoi cofob

🏳️‍🌈
View GitHub Profile
@selivan
selivan / cf-update-all-zones-settings.sh
Last active March 23, 2025 17:41
Script to disable TLS ECH(Encrypted Client Hello) on all zones for a Cloudflare account
#!/bin/bash
ACCOUNT_EMAIL="$1"
GLOBAL_API_KEY="$2"
OPTION="${3:-ech}"
VALUE="${4:-off}"
if [ -z "${ACCOUNT_EMAIL}" ] || [ -z "${GLOBAL_API_KEY}" ]; then
echo "Usage: $0 CLOUDFLARE_ACCOUNT_EMAIL CLOUDFLARE_GLOBAL_API_KEY [OPTION] [VALUE]"
echo "Set specified setting for all zones for given account"
@AnthonyMikh
AnthonyMikh / main.rs
Created September 16, 2021 17:41
Сопровождающий код к статье "Как написать FizzBuzz на собеседовании" (habr.com/ru/post/578198)
struct Z;
struct S<T>(T);
trait Add<Rhs> {
type Sum;
}
type SumOf<N, M> = <N as Add<M>>::Sum;
impl<N> Add<N> for Z {
peers = [
'tcp://ygg.cofob.ru:80',
'tcp://ygg-ru.cofob.ru:18000',
'tcp://ygg-ru2.cofob.ru:80',
'tcp://46.151.26.194:60575'
]
import os, json, random
if not os.path.isdir('yggspoof'):
os.mkdir('yggspoof')
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution.md
Last active June 4, 2025 00:23
Fix DNS resolution in WSL2

Permanent WSL DNS Fix (WSL 2.2.1+)

If you're encountering ping github.com failing inside WSL with a Temporary failure in name resolution, you're not alone — this has been a long-standing issue, especially when using VPNs or corporate networks.

This issue is now fixed robustly with DNS tunneling, which preserves dynamic DNS behavior and avoids limitations like WSL’s former hard cap of 3 DNS servers in /etc/resolv.conf.

DNS tunneling is enabled by default in WSL version 2.2.1 and later, meaning that if you're still seeing DNS resolution issues, the first and most effective fix is simply to upgrade WSL. Upgrading WSL updates the WSL platform itself, but does not affect your installed Linux distributions, apps, or files.

To upgrade WSL, follow these steps,

@chirauki
chirauki / migrate.py
Last active March 29, 2024 15:52
KVM migration script
#!/usr/bin/env python
import logging
import argparse
import libvirt
import sys
import os
import subprocess
import paramiko
import xml.etree.ElementTree as ET
from urlparse import urlparse
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 4, 2025 14:40
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname