Skip to content

Instantly share code, notes, and snippets.

View breakertt's full-sized avatar
🐧
Exploring Linux Kernel!

Tianyi Gao breakertt

🐧
Exploring Linux Kernel!
  • School of Informatics, University of Edinburgh
  • Edinburgh, UK
  • 11:40 (UTC)
View GitHub Profile
@breakertt
breakertt / network-restart.sh
Created January 18, 2026 17:09 — forked from tachang/network-restart.sh
Cleanly restart the default libvirt network
#!/bin/bash
#
# Yury V. Zaytsev <yury@shurup.com> (C) 2011
#
# This work is herewith placed in public domain.
#
# Use this script to cleanly restart the default libvirt network after its
# definition have been changed (e.g. added new static MAC+IP mappings) in order
# for the changes to take effect. Restarting the network alone, however, causes
# the guests to lose connectivity with the host until their network interfaces
@breakertt
breakertt / plex.nginx.conf
Created August 26, 2024 15:22 — forked from ometa/plex.nginx.conf
NGINX reverse proxy in front of Plex media server v1.3.3.3148
# This example assumes the NGINX proxy is on the same host as the Plex Media Server.
# To configure Plex Media Server to serve requests without requiring authentication,
# ensure that your LAN subnet is correctly added to the advanced server setting called
# "List of IP addresses and networks that are allowed without auth". Example:
# 192.168.0.1/24
upstream plex-upstream {
server 127.0.0.1:32400;
}
@breakertt
breakertt / datastructure.md
Created August 26, 2024 00:04 — forked from BruceChen7/datastructure.md
[#networking]#networking

如何学习网络协议栈

工具

  • systemtap 几乎无所不能,可以在内核放置探测点,然后执行自己的代码。
  • kprobe:简单的工具,可以快速检验某个函数是否被执行到
  • packetdrill:用于验证 TCP 协议的行为很有用。

数据结构

@breakertt
breakertt / doh
Created August 24, 2024 19:50 — forked from M0r13n/doh
Setup Cloudflare as a DoH (DNS over HTTPS) resolver on Mikrotik devices (RouterOS v7.0.2+)
# Temporarily add a normal upstream DNS resolver
/ip dns set servers=1.1.1.1,1.0.0.1
# CA certificates extracted from Mozilla
/tool fetch url=https://curl.se/ca/cacert.pem
# Import the downloaded ca-store (127 certificates)
/certificate import file-name=cacert.pem passphrase=""
# Set the DoH resolver to cloudflare
@breakertt
breakertt / ubuntu_update_booting_kernel.md
Created August 19, 2024 16:24 — forked from chaiyujin/ubuntu_update_booting_kernel.md
Ubuntu: Install Kernel and Set GRUB Default Kernel

Ubuntu: Install Kernel and Set GRUB Default Kernel

Install Kernel

Install the default kernel:

sudo apt install linux-generic

Set GRUB Default Kernel

  1. Find entrance from /boot/grub/grub.cfg
    • Get the $menuentry_id_option:
const uptimerobot_id = 'your uptimerobot_id'
const upstream = 'stats.uptimerobot.com'
const upstream_path = '/' + uptimerobot_id
const replace_dict = {
'$upstream': '$custom_domain',
@breakertt
breakertt / ARMonQEMUforDebianUbuntu.md
Created March 23, 2024 17:31 — forked from luk6xff/ARMonQEMUforDebianUbuntu.md
Emulating ARM with QEMU on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

If there's no qemu-arm-static in the package list, install qemu-user-static instead

@breakertt
breakertt / tunneling.md
Created February 11, 2024 00:13 — forked from itslukej/tunneling.md
Tunneling a whole process through wireguard

Tunneling a whole process through wireguard

Certain company blocking a certain hosting provider? No problem, just tunnel the process through a small VPS with wireguard.

Consider server A your blocked server and server B your VPS.

Step 1: Generate a keypair on server A and server B

Server A: