Skip to content

Instantly share code, notes, and snippets.

View rapiz1's full-sized avatar
😵‍💫
Busy work!

Yujia Qiao rapiz1

😵‍💫
Busy work!
View GitHub Profile
@rapiz1
rapiz1 / count_clients.sh
Created September 21, 2022 05:03
Count online clients on OpenWrt
#!/bin/sh
mac_blacklist="01:00:8c:fa:1a:ae:d1"
leases=$(cat /tmp/dhcp.leases | sed 's/*/unknown/')
IFS='
'
online_cnt=0
# grep NUD status, see also https://www.ccexpert.us/routing-tcp-ip-2/neighbor-unreachability-detection.html
@rapiz1
rapiz1 / crun.fish
Created February 18, 2021 14:22
Fish script to compile and run c program like go run
# Compile and run c program, just like `go run`
# Usage: crun hello.c
# Put this to ~/.config/fish/config.fish, or create a file in ~/.config/fish/functions/
function crun
set prog $argv[1]
set exec (mktemp)
if gcc $prog -o $exec
set_color brgreen
echo -e Compilation success. Running...\n
@rapiz1
rapiz1 / gsoc2020-ds.md
Last active March 1, 2023 12:35
GSoC 2020 Sequential Data Structures
@rapiz1
rapiz1 / gsoc2020-ds-notes.md
Last active August 26, 2020 03:22
GSoC 2020 - Chapel - Notes on Data Structure
@rapiz1
rapiz1 / README.md
Created February 14, 2020 14:07
FeelUOwn 一起听歌

依赖

服务器需要 python3.7 以上版本 客户端除了 FeelUOwn 无其他依赖

客户端

__init__.py放到~/.FeelUOwn/plugins/sync下,如果没有此目录请建立

服务器

直接运行server.py就行