Skip to content

Instantly share code, notes, and snippets.

View king6cong's full-sized avatar

wangcong king6cong

View GitHub Profile
#!/bin/sh
echo_eval_cmd() {
cmd=$1
echo "======"
echo "$cmd"
echo "======"
eval "$cmd"
}
echo_eval_cmd "curl -s ipinfo.io/ip"
# sync_bin ssl.sh [email protected]
# brew install gawk first on macOS
mkdir -p ~/log
while true; do
# curl -sS https://api.zjurl.cn/dns 2>&1 >> ~/log/ssl-host; echo >> ~/log/2ssl-host
# curl -sS https://123.58.9.80/dns -k -H 'Host: api.zjurl.cn' 2>&1 >> ~/log/ssl-ip; echo >> ~/log/ssl-ip
curl -sS https://api.zjurl.cn/dns 2>&1 | gawk '{ print strftime("[%Y-%m-%d %H:%M:%S]"), $0 }' 2>&1 >> ~/log/ssl-host-t
curl -sS https://123.58.9.80/dns -k -H 'Host: api.zjurl.cn' 2>&1 | gawk '{ print strftime("[%Y-%m-%d %H:%M:%S]"), $0 }' 2>&1 >> ~/log/ssl-ip-t
sleep 1
done
fn di_dynamic() {
struct S;
struct P;
trait T {
fn name(&self);
}
impl T for S {