Skip to content

Instantly share code, notes, and snippets.

@lexrus
lexrus / ss_startup.sh
Last active November 13, 2023 13:41
ss_startup.sh
#!/bin/sh
#
# This startup script initializes a Shadowsocks server in Debian 11.
# It's compatible with DigitalOcean, Linode and Vultr.
#
# Author: @lexrus https://github.com/lexrus
#
# Get $100 free credit for VPS with my referral links:
# DigitalOcean: https://m.do.co/c/3eb5cf371fc9
# Linode: https://www.linode.com/lp/refer/?r=9f144941e797d495a10c2841c3137ce1acde5f15
@koush
koush / .bash_profile
Last active February 23, 2022 23:54
Put this in your .bash_profile(s) to open VS Code on your local machine while SSH'd into a remote machine.
# this needs to be on the *remote* machine.
if [ ! -z "$SSH_CLIENT" ]
then
function code() {
local ssh_client_host=$(echo $SSH_CLIENT | cut -d ' ' -f1)
if [ -z "$1" ]
then
local argpath="."
@muff-in
muff-in / resources.md
Last active April 27, 2024 22:37
A curated list of Assembly Language / Reversing / Malware Analysis / Game Hacking-resources
@adwait1-g
adwait1-g / running_the_kernel.md
Last active February 21, 2024 15:53
This gist tells you how to build the kernel and run it on qemu. This is also a way to get started with kernel's internals.

1. Downloading and building the Linux kernel

  1. Clone the github repository onto your local machine.
$ git clone https://github.com/torvalds/linux.git
$ cd linux
  1. Configure the build
@davidwu111
davidwu111 / docker_openwrt_config.md
Last active July 1, 2023 08:33
Clash Docker & Openwrt 配置与踩坑记录

Clash Docker & Openwrt 配置与踩坑记录


使用Openwrt作为主路由,另一台Ubuntu 18.04主机上使用Docker运行Clash来作为网关进行转发,以达到按规则智能翻墙的目的。也是很多人提到的“旁路由”方法。

注:Openwrt可以直接编译OpenClash,我这次只是纯粹为了折腾而折腾。


@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active April 30, 2024 09:07
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@riverscn
riverscn / 北京联通IPTV内网组播.m3u
Created August 4, 2019 15:55
北京联通IPTV内网组播地址节目表(239.2.1.1网段)
#EXTM3U name="北京联通IPTV(RTP)”
#EXTINF:-1,CCTV-1高清(1)
rtp://239.2.1.129:8000
#EXTINF:-1,CCTV-2高清(2)
rtp://239.2.1.60:8084
#EXTINF:-1,CCTV-4高清(4)
rtp://239.2.1.105:8092
#EXTINF:-1,CCTV-7高清(7)
rtp://239.2.1.61:8104
#EXTINF:-1,CCTV-9高清(9)
@maboloshi
maboloshi / README.MD
Last active February 2, 2024 14:51
[小米9 刷入欧洲版MIUI for macOS]

小米9 刷欧洲版 MIUI 固件及适当的本土化修复

本教程不保证它的权威性和正确性,也不对任何实践中的错误、数据丢失等问题负责!
本教程平台为 macOS, 其他系统请酌情参考

更新说明

@ 2020/8/29

  1. 添加"介绍"
  2. 更新 TWRP 信息
@sdhzdmzzl
sdhzdmzzl / bj-unicom-iptv.m3u
Last active April 23, 2024 07:10
北京联通iptv列表
#EXTM3U name="bj-unicom-iptv"
#EXTINF:-1,CCTV1
rtp://239.3.1.1:8000
#EXTINF:-1,CCTV2
rtp://239.3.1.2:8004
#EXTINF:-1,CCTV4
rtp://239.3.1.4:8216
#EXTINF:-1,CCTV7
rtp://239.3.1.7:8024
#EXTINF:-1,CCTV9
@crazyguitar
crazyguitar / dns.md
Last active September 24, 2023 12:10
learn dns hard way

Domain Name Server (DNS)

Concept

  1. Two type of DNS network activities:
    1. lookup: DNS client queries a DNS server for information
    2. zone transfers: DNS server (the secondary server) requests from another DNS server (the primary server)
  2. DNS lookups are usualy executed usin UDP. (If some of data is lost in transit by UDP, the lookup will be redone using TCP)
  3. DNS sever uses well-known port 53 (UDP/TCP)
  4. Proxying characteristics of DNS: