bash-for-fun(1)

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
}
相关推荐
小小鱼儿飞17 小时前
QT音乐播放器18----新歌速递播放、隐藏顶部和底部工具栏、自定义ToolTips
开发语言·qt
穆雄雄17 小时前
Rust 程序适配 OpenHarmony 实践:以 sd 工具为例
开发语言·rust·harmonyos
0***1417 小时前
Swift资源
开发语言·ios·swift
z***I39417 小时前
Swift Tips
开发语言·ios·swift
J***Q29217 小时前
Swift Solutions
开发语言·ios·swift
铅笔小新z17 小时前
C++入门指南:开启你的编程之旅
开发语言·c++
Gavin-Wang17 小时前
Swift + CADisplayLink 弱引用代理(Proxy 模式) 里的陷阱
开发语言·ios·swift
molunnnn1 天前
第四章 Agent的几种经典范式
开发语言·python
洛_尘1 天前
JAVA EE初阶 2: 多线程-初阶
java·开发语言