Skip to content

Instantly share code, notes, and snippets.

View DevSusu's full-sized avatar
🎯
Focusing

Subin Choi DevSusu

🎯
Focusing
View GitHub Profile
@DevSusu
DevSusu / 1-setup.sh
Last active April 19, 2024 17:29
Setup Apache, LetsEncrypt, Vsftpd for multiple domain, multiple users (Ubuntu 18.04)
# reference
# ubuntu, php
# https://websiteforstudents.com/apache2-with-php-7-1-support-on-ubuntu-18-04-lts-beta-server/
# apache
# https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-18-04
# https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-18-04
# vsftpd
@DevSusu
DevSusu / convert_png2jpg.sh
Last active May 6, 2020 07:56
Batch png to jpg Compress and Convert
find . -type f -name "*.png" -exec basename {} .png ';' | while read -r line ; do
$(convert $line.png pnm:- | mozcjpeg -quality 80 > jpg/$line.jpg)
done
find . -type f -name "*.png" -exec basename {} .png ';' | while read -r line ; do
$(convert $line.png -background white -alpha remove -alpha off pnm:- | mozcjpeg -quality 80 > jpg/$line.jpg)
done
@DevSusu
DevSusu / convert_mov.sh
Last active December 4, 2019 05:20
converting mov into some others
# referenced from:
# https://medium.com/@Peter_UXer/small-sized-and-beautiful-gifs-with-ffmpeg-25c5082ed733
# https://www.bugcodemaster.com/article/convert-video-animated-gif-using-ffmpeg
# to gif, with custom frame rate
ffmpeg -i input.mov -r 20 \
-filter_complex "[0:v] fps=15,scale=w=1080:h=-1,split \
[a][b];[a] palettegen=stats_mode=single [p];[b][p] paletteuse=new=1" \
output.gif -hide_banner