Last active
June 5, 2020 14:08
-
-
Save JerryBian/2d5e5983f1de71cea831344f249707a7 to your computer and use it in GitHub Desktop.
Handy useful shell scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# setup NPM behinds a HTTP proxy | |
npm config set proxy http://127.0.0.1:1098 | |
npm config set https-proxy http://127.0.0.1:1098 | |
# unset NPM proxy | |
npm config rm proxy | |
npm config rm https-proxy | |
# set NPM to mirror registry | |
npm config set registry https://registry.npm.taobao.org | |
# set electron-packager mirror | |
export ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron/ | |
export ELECTRON_CUSTOM_DIR=9.0.2 # replace to your electron version | |
# delete all files with extension `.jpg` under fold A | |
# https://ss64.com/bash/find.html | |
find ./A -type f -name '*.jpg' -delete | |
find ./A -type f -name '*.jpg' -delete # ignore case | |
find ./A -type f -name "*.jpg" -size -160k -delete # less than 160k | |
find ./A -type f -name "*.jpg" -size 160M -delete # exactly 160MB | |
find ./A -type f -name "*.jpg" -size +160c -delete # greater than 160 bytes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment