本文共 737 字,大约阅读时间需要 2 分钟。
bash 类型
# 循环遍历下载,不下载父页面,文件已存在的话不下载wget -r -nc -np https://yum.dockerproject.org/repo/main/centos/# 分片20M 上传bypy -vvv -s 20M upload# mac用代理启动单个appproxychains open -a Airy.app# mac下查看端口占用nettop -nm tcp# brewbrew uninstall zshbrew services listbrew services startbrew services stopbrew services restart# 关闭所有磁盘的索引服务sudo mdutil -a -i off
IP
# 获取IP(国内)curl cip.cccurl haoip.cncurl ip.taobao.com/service/getIpInfo2.php?ip=myipcurl myip.ipip.netcurl ns1.dnspod.net:6666# 国外(json)curl ipinfo.iocurl ipinfo.io/ipcurl ipinfo.io/orgcurl ipinfo.io/8.8.8.8/orgcurl ifconfig.mecurl ifconfig.me/ip
Python
# 如果是相对路径,获取绝对路径if not os.path.isabs(some_path): print os.path.realpath(some_path)# 获取脚本文件的路径print os.path.split(os.path.realpath(__file__))[0]
转载地址:http://eucci.baihongyu.com/