Skip to content

Instantly share code, notes, and snippets.

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

Egor Ternovoi cofob

🏳️‍🌈
View GitHub Profile

NixOS Binary Cache Proxy

nixos-cache-proxy.cofob.dev is a simple reverse proxy to cache.nixos.org, running over the Cloudflare network and utilizing its cache.

It is intended for use if you:

  1. Do not have access to cache.nixos.org (e.g., your government has blocked it).
  2. You experience low speed on cache.nixos.org.

How to Use It

@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 December 9, 2025 16:00
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 December 8, 2025 03:35
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname