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
}
相关推荐
yue00810 分钟前
C# 更改窗体样式
开发语言·c#
普通网友14 分钟前
C++中的适配器模式
开发语言·c++·算法
风闲121716 分钟前
Qt源码编译记录
开发语言·qt
普通网友37 分钟前
C++中的委托构造函数
开发语言·c++·算法
月上柳青1 小时前
OpenWrt系统上配置batman-adv快速开始与配置详解
开发语言·mysql·php
全栈陈序员1 小时前
基于Rust 实现的豆瓣电影 Top250 爬虫项目
开发语言·爬虫·rust
普通网友1 小时前
C++中的代理模式实战
开发语言·c++·算法
百锦再1 小时前
第17章 模式与匹配
开发语言·后端·python·rust·django·内存·抽象
WangMing_X1 小时前
C# XML操作演示示例项目(附源码完整)
开发语言·microsoft·php
普通网友1 小时前
C++模块化设计原则
开发语言·c++·算法