let curl do some thing
bash
复制代码
# curl Funs for helping, Usage: check
check() {
# Info
echo "support commands: [wet, addr, ip, ]"
read -p "[type in command]: " subcommand
case $subcommand in
ip)
curl cip.cc
;;
addr)
curl ipinfo.io/8.8.8.8
;;
wet)
curl wttr.in/?lang=zh-cn
;;
*)
echo "Not support Yet"
;;
esac
}
# Usage: if-interesting <url or one-string-no-sep>
if-interesting() {
curl qrenco.de/"${1}"
}
proxy git clone
bash
复制代码
# Load this function to your .bashrc
# Usage: proxy-git-clone <path-to-repo>
proxy-git-clone() {
# WARN: Maybe not work
git clone https://mirror.ghproxy.com/"${1}"
}
connect to my own windows
bash
复制代码
# Make sure your network in the same domain
# Deps: freerdp2
connect-windows() {
##################
# 192.168.42.185 #
##################
#xfreerdp /u:etcix /v:${1}:3389 /f /floatbar /d:echo-etcix /p:1
xfreerdp /u:etcix /v:${1}:3389 /f /floatbar /d:echo-etcix /p:1
# check more: man xfreerdp
}