ffmpeg -i input.mp4 -vf "drawtext=fontfile='/Users/joel/Library/Fonts/Calderock Inky.ttf':text='%{eif\:(NNN-t)/60\:d\:2}\:%{eif\:mod(NNN-t,60)\:d\:2}':fontcolor=white:fontsize=48:x=570:y=1100" -c:a copy output.mp4
where NNN = video length Category: Code
actual code or code concepts
border-radius shorthand, complete
border-radius: 1px 2px 3px 4px / 5px 6px 7px 8px;
is the same as border-top-left-radius: 1px / 5px; border-top-right-radius: 2px / 6px; border-bottom-right-radius: 3px / 7px; border-bottom-left-radius: 4px / 8px;
The order is border-top-left-radius x border-top-right-radius x border-bottom-right-radius x border-bottom-left-radius x / border-top-left-radius y border-top-right-radius y border-bottom-right-radius y border-bottom-left-radius y ; zsh globbing: global expansion shortcuts
ffmpeg karaoke version
ffmpeg -i file.mp3 -af pan="stereo|c0=c0|c1=-1*c1" -ac 1 novocal/file.mp3
ffmpeg -i novocal/file.mp3 -af "bass=g=6:f=100:w=0.5" bassboost/file.mp3
ffmpeg -i novocal/file.mp3 -i file.mp3 -filter_complex "[0:a]volume=1.0[a0];[1:a]volume=0.3[a1];[a0][a1]amix=inputs=2[a]" -map "[a]" done/file.mp3
ffmpeg -i $file -i mix/$file -map 0:v -map 1:a -map_metadata 0 -map_metadata:s:a 0:s:a -c: copy done/$file
original song copies at /Volumes/sneakernet/karaoke for file in *.mp3 do ffmpeg -i $file -af pan="stereo|c0=c0|c1=-1*c1"…
add allowed MIME types to media uploads
add this to functions. php
function allow_EXT_mime($mimes) { $mimes['EXT'] = 'TYPE/EXT'; return $mimes; } add_filter('upload_mimes', 'allow_EXT_mime');
EXT = filename extension TYPE = official MIME type burn iso to usb
diskutil list diskutil unmountDisk /dev/diskNN sudo dd if=/path/to.iso of=/dev/rdiskNN bs=1m diskutil eject /dev/diskNN
find last item in a row in a Google Sheet
=index(A1:n1;1;counta(A1:n1))
where n
is the last column to contain any data get total size of Amazon S3 bucket or folder
aws s3 ls --summarize --human-readable --recursive s3://bucket/path/ | grep "Total Size" >> list.txt;
prevent WordPress from adding new themes with core updates
add to wp-config
define('CORE_UPGRADE_SKIP_NEW_BUNDLED', true);
regex to export all dotfiles or wordpress resized images to new list
awk '/\/\./ { print }' all.txt > dotfiles.sh
- call awk and open command with single quote
- open pattern with slash
- pattern is
- escaped slash
- escaped dot
- close pattern with slash
- call print and close command with a single quote
- input file name
- redirect results to
- output file name
awk '/.+[0-9]{2,4}x[0-9]{2,4}\.[a-z]{3,4}/ { print }'…