Yujia Qiao
Huazhong University of Science and Technology
Email: rapiz3142@gmail.com
''' | |
This is a helper script to watch application status and send notification on any state change. | |
Use at your own risk. | |
Set env var APPLICATION_NO to your case number e.g. ISC25000000000 | |
Set env var CHECK_INTERVAL to refresh interval in seconds | |
Set env var INITIAL_COOKIES to the cookie after log in to ICA website, in http header format | |
Implement your own notification logic in send_notification | |
''' |
{ | |
# needed to use replace-response plugin | |
order replace after encode | |
} | |
# serve a site that redirect all articles to archive.today, and reverse proxy other pages | |
http:// { | |
@wsjArticles path /articles/* | |
redir @wsjArticles "http://archive.today/?run=1&url=https://cn.wsj.com{uri}" 302 |
#!/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 |
# 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 |
Yujia Qiao
Huazhong University of Science and Technology
Email: rapiz3142@gmail.com