Skip to content

Instantly share code, notes, and snippets.

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 / .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
# fails on iPhone but not iPad - any ideas for iPhones?
codecreate-dev /
Created Jun 9, 2020
Create image covers from mp4 vids in a for loop
for vid in *.mp4; do ffmpeg -i $vid -codec mjpeg -ss 4 -vframes 1 -q:v 1 ./covers/$vid.jpg; done
sudo service php7.4-fpm restart && sudo systemctl restart apache2