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
}
相关推荐
编程星空11 分钟前
css主题色修改后会多出一个css吗?css怎么定义变量?
开发语言·后端·rust
软件黑马王子19 分钟前
Unity游戏制作中的C#基础(6)方法和类的知识点深度剖析
开发语言·游戏·unity·c#
Logintern0929 分钟前
使用VS Code进行Python编程的一些快捷方式
开发语言·python
Multiple-ji40 分钟前
想学python进来看看把
开发语言·python
一个小白11 小时前
C++——list模拟实现
开发语言·c++
bug总结1 小时前
新学一个JavaScript 的 classList API
开发语言·javascript·ecmascript
Nicole Potter1 小时前
请说明C#中的List是如何扩容的?
开发语言·面试·c#
十八朵郁金香2 小时前
通俗易懂的DOM1级标准介绍
开发语言·前端·javascript
阿尔法波2 小时前
python与pycharm如何设置文件夹为源代码根目录
开发语言·python·pycharm
xing25162 小时前
pytest下allure
开发语言·python·pytest