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
find . -type f -execdir mogrify -format jpg {} \; |
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
find . -type f | sed -n 's/..*\.//p' | sort | uniq -c |
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
ls dirname | shuf -n 10 | |
find dirname -type f | shuf -n 10 |
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
# clear previous backup | |
rm -rf "$(git rev-parse --git-dir)/refs/original/" | |
commit="$1" | |
date=$(date -d "$2" +%s) | |
git filter-branch --env-filter \ | |
"if [ \$GIT_COMMIT = '$commit' ]; then | |
export GIT_AUTHOR_DATE='$date' | |
export GIT_COMMITTER_DATE='$date' | |
export GIT_COMMITTER_NAME="\$GIT_AUTHOR_NAME" |
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
def process(): | |
pass | |
while True: | |
try: | |
process() | |
except EOFError: | |
break |
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
DB::statement('SET FOREIGN_KEY_CHECKS=0'); | |
DB::table('products')->truncate(); |
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
robocopy d: g: /MIR /eta /R:3 /W:5 |
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
REM 轉檔 | |
for %f in (*.mts) do ffmpeg -deinterlace -i "%~f" "%~nf.mp4" | |
REM 轉擋+保留修改時間/存取時間 | |
for %f in (*.mts) do ffmpeg -deinterlace -i "%~f" "%~nf.mp4" & touch -r "%~f" "%~nf.mp4" | |
for %f in (*.mp4) do ffmpeg -deinterlace -i "%~f" "%~nf_2.mp4" & touch -r "%~f" "%~nf_2.mp4" | |
# Linux | |
for i in *.MTS; do ffmpeg -deinterlace -i "$i" "${i%.*}.mp4"; done |
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
git rm -r --cached . | |
git add . |