Skip to content

Instantly share code, notes, and snippets.

@qmel
qmel / restart-xray-tun.sh
Created April 2, 2026 12:35
Using Xray TUN protocol with IP routing set to prevent routing loops in main table
#!/usr/bin/env bash
DEFAULT_GATEWAY=192.168.1.1 # default gateway, for example, received by DHCP client
DEFAULT_DEV=ens3 # default gateway network device
DNS=8.8.8.8 # DNS ip used by OS
XRAY_GATEWAY= # Xray proxy gateway IP set in Xray config.json
XRAY_DEV=xray0 # Xray TUN name set in Xray config.json
# Xray config.json should look like this:
# "inbounds": [
@qmel
qmel / delentropy.py
Last active January 22, 2026 13:01 — forked from mxmlnkn/delentropy.py
Image Delentropy
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Trying to reproduce: https://arxiv.org/abs/1609.01117
from ssl import SSLContext
from scipy import ndimage,signal,datasets
import imageio
import numpy as np
import matplotlib.pyplot as plt