Example:
file_size=123456778echo $file_size | awk '{ split( "B KB MB GB TB PB EB ZB YB" , v ); s=1; while( $1>1024 && s<9 ){ $1/=1024; s++ } printf "%.2f %s", $1, v[s] }'| for i in $(ls *rst) | |
| do | |
| filename="${i%.*}" | |
| echo "Converting $i to $filename.md" | |
| pandoc "$i" -f rst -t gfm -o "$filename.md" | |
| done |
| #!/bin/bash | |
| # 原作者: t0n1 | |
| # 来自: http://hacktracking.blogspot.ca/2013/07/download-mega-files-from-command-line.html | |
| # | |
| # 修改: maboloshi | |
| # <file_url>: https://mega.nz/#!<id>!<decyption Key> | |
| url=$1 | |
| out_file="$2" |
| #! /bin/bash | |
| # 在需要转换图片的目录下运行此脚本 | |
| # convert命令是ImageMagick这个图片处理软件包中的一个命令 | |
| # 安装ImageMagick之后,才能使用convert命令 | |
| # man convert可以查看命令用法帮助文档 | |
| # 逐个将所有png,bmp,jpg格式图片文件转换为原来尺寸的1/4大并保存为jpg格式图片文件 | |
| # 转换后重命名 |
| #!/bin/bash | |
| # | |
| #Author: atrandys | |
| # | |
| # | |
| function blue(){ | |
| echo -e "\033[34m\033[01m$1\033[0m" | |
| } | |
| function green(){ | |
| echo -e "\033[32m\033[01m$1\033[0m" |
| // Add a button to Collapse or Expand files in a Github Gist | |
| // | |
| // Install Tampermonkey and add this as a script | |
| // ==UserScript== | |
| // @name Github Gists: Expand / Collapse Files | |
| // @namespace https://gist.github.com/Jaace/7b70d2bb19af63e10b144ed7d867eae0 | |
| // @version 0.1 | |
| // @description Add a button to expand or collapse files in github gists | |
| // @author Jason Boyle |