Recursively find and replace with bash by leveraging the grep and sed command.
grep -rlG <regexp pattern> <path> | xargs sed -i '' 's/pattern/replacement/g'| # with git: | |
| git ls-files | wc -l | awk '{$1=$1;print $1 " total"}';git ls-files| sed 's/.*\.//' | sort | uniq -c | sort -r|awk '{$1=$1;print}' | |
| # without git | |
| find . -type f | wc -l | awk '{$1=$1;print $1 " total"}'; find . -type f | sed 's/.*\.//' | sort | uniq -c | sort -r|awk '{$1=$1;print}' |
| <video | |
| id="video" | |
| width="100%" | |
| preload="auto" | |
| x-webkit-airplay="true" | |
| webkit-playsinline="true" | |
| playsinline="true" | |
| x5-video-player-type="h5" | |
| x5-video-player-fullscreen="true" | |
| src="https://video.c-ctrip.com/videos/u20j0z000000mjvtd0DB6.mp4" |
| // ==UserScript== | |
| // @name baidu yun 资源链接 | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description 自动将google搜索结果页面中百度云盘地址变成可点击的链接,如果链接附近有提取码,在点击时自动复制 | |
| // @author You | |
| // @match https://www.google.com/search* | |
| // @grant none | |
| // ==/UserScript== |
| // ==UserScript== | |
| // @name set video playback rate | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description change the playback rate of the video | |
| // @author wayou | |
| // @match *://pan.baidu.com/* | |
| // @match *://www.zealer.com/* | |
| // @grant unsafeWindow | |
| // @grant GM_addStyle |
comment
#,// or whateveruncomment
| registry "https://registry.npm.taobao.org" | |
| disturl "https://npm.taobao.org/dist" | |
| nvm_nodejs_org_mirror "http://npm.taobao.org/mirrors/node" | |
| NODEJS_ORG_MIRROR "http://npm.taobao.org/mirrors/node" | |
| sass_binary_site "http://npm.taobao.org/mirrors/node-sass" | |
| electron_mirror "http://npm.taobao.org/mirrors/electron/" | |
| SQLITE3_BINARY_SITE "http://npm.taobao.org/mirrors/sqlite3" | |
| profiler_binary_host_mirror "http://npm.taobao.org/mirrors/node-inspector/" | |
| node_inspector_cdnurl "https://npm.taobao.org/mirrors/node-inspector" | |
| selenium_cdnurl "http://npm.taobao.org/mirrors/selenium" |
| npx license mit > LICENSE && npx gitignore node && npx covgen [email protected] && yarn init -y |
| # package-lock=false | |
| registry="https://registry.npm.taobao.org" | |
| disturl="https://npm.taobao.org/dist" | |
| nvm_nodejs_org_mirror="http://npm.taobao.org/mirrors/node" | |
| nodejs_org_mirror="http://npm.taobao.org/mirrors/node" | |
| sass_binary_site="http://npm.taobao.org/mirrors/node-sass" | |
| electron_mirror="http://npm.taobao.org/mirrors/electron/" | |
| SQLITE3_BINARY_SITE="http://npm.taobao.org/mirrors/sqlite3" | |
| profiler_binary_host_mirror="http://npm.taobao.org/mirrors/node-inspector/" | |
| node_inspector_cdnurl="https://npm.taobao.org/mirrors/node-inspector" |
| emcc_image="trzeci/emscripten"; | |
| if [[ "$(docker images -q $emcc_image:latest 2> /dev/null)" == "" ]]; then | |
| docker pull emcc_image; | |
| fi | |
| alias emcc="docker run --rm -v "$(pwd):/src" $emcc_image emcc"; | |
| # test | |
| emcc -v |