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
#!/usr/bin/env bash | |
find . -name .DS_Store -type f -delete -print |
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
#!/usr/bin/env bash | |
find . -name node_modules -type f -delete -print |
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
#!/usr/bin/env bash | |
git config --global user.name "Krittanan Pingclasai" | |
git config --global user.email kp@kpping.me | |
git config --global core.editor emacs | |
git config --global alias.tree "log --graph --pretty=oneline --abbrev-commit" | |
touch ~/.gitignore_global && git config --global core.excludesfile ~/.gitignore_global |
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
#!/usr/bin/env bash | |
QUALITY=60 # 0 - 100 | |
FILE_PNG="image.jpg" # in | |
FILE_JPG="image.png" # out | |
convert -strip -interlace Plane -quality $QUALITY $FILE_PNG $FILE_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
#!/usr/bin/env bash | |
FILE_VIDEO="video.mp4" # in | |
FILE_PNG="poster.png" # out | |
ffmpeg -i $FILE_VIDEO -ss 00:00:01.000 -vframes 1 $FILE_PNG |
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
#!/usr/bin/env bash | |
FILE_IN="video.mp4" # in | |
REDUCED_VALUE=24 # integer | |
FILE_OUT="reduced_quality_video.mp4" # out | |
# reduced + no sound (with -an option) | |
ffmpeg -i $FILE_IN -vcodec libx264 -crf $REDUCED_VALUE -an $FILE_OUT | |
# only reduced |
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
#!/usr/bin/env bash | |
FILE_IN="video.mp4" # in | |
FILE_OUT="trimmed_video.mp4" # out | |
ffmpeg -i $FILE_IN -ss 00:00:01.0000 -t 00:00:09.0000 -async 1 $FILE_OUT |
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
#!/usr/bin/env bash | |
FILE_IN="video.mp4" # in | |
FILE_OUT="3xfaster_video.mp4" # out | |
ffmpeg -i $FILE_IN -filter:v "setpts=0.33*PTS" $FILE_OUT |
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
#!/usr/bin/env bash | |
FILE_IN="video.mp4" # in | |
SCALE="640x360" # width x height | |
FILE_OUT="video_640x360.mp4" # out | |
ffmpeg -i $FILE_IN -vf scale=$SCALE $FILE_OUT |
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
#!/usr/bin/env bash | |
URL="" | |
youtube-dl --all-formats -o %(id)s-%(width)sx%(height)s-%(format_id)s.%(ext)s $URL |
OlderNewer