Skip to content

Instantly share code, notes, and snippets.

@codecreate-dev
codecreate-dev / mount-music-partition.txt
Created Jun 23, 2020
mount bind partition to home user Music
View mount-music-partition.txt
sudo mount --bind /media/peter/Music /home/peter/Music
@codecreate-dev
codecreate-dev / .htaccess
Created Jun 10, 2020
Force download of files - media
View .htaccess
<FilesMatch "\.(mov|mp3|pdf|mp4|avi|wmv)$">
ForceType application/octet-stream
Header set Content-Disposition attachment
</FilesMatch>
# fails on iPhone but not iPad - any ideas for iPhones?
@codecreate-dev
codecreate-dev / mp4-cover-image-create.sh
Created Jun 9, 2020
Create image covers from mp4 vids in a for loop
View mp4-cover-image-create.sh
for vid in *.mp4; do ffmpeg -i $vid -codec mjpeg -ss 4 -vframes 1 -q:v 1 ./covers/$vid.jpg; done
View php-apache-restart.sh
sudo service php7.4-fpm restart && sudo systemctl restart apache2