mkdir ~/picture-in-pictures/
/bin/bash -c 'youtube-dl --ignore-errors --yes-playlist -o "${HOME}/./picture-in-picture/%(playlist_id)s-%(playlist_index)s" `xclip -selection c -o`'
start a player instance
#!/bin/bash | |
LEFT=$1 | |
RIGHT=$2 | |
BASE=$2 | |
OUT=$2 | |
echo $LEFT | |
echo $RIGHT | |
echo $BASE |
#!/bin/bash | |
ffmpeg -i $1 -c:v libvpx-vp9 -pix_fmt yuva420p -auto-alt-ref 0 -r 30 -t 3 -filter:v scale=512:-1 -an $1.webm |
def sequential_subset?(a, b) | |
m = a.size | |
n = b.size | |
(0 ... n).each do |i| | |
j = 0 | |
(0 ... m).each do |_| | |
break if b[i + j] != a[j] | |
j += 1 | |
end | |
return true if j == m |
#!/bin/bash | |
FILE=$1 | |
OUTPUT_FOLDER=$(basename "${FILE%.*}") | |
[ -z "$FILE" ] && echo "ERROR: file path is required" && exit 1 | |
[ -z "$OUTPUT_FOLDER" ] && echo "ERROR: cannot set output folder" && exit 1 | |
[ -d "./$OUTPUT_FOLDER" ] && echo "ERROR: output folder exists" && exit 1 | |
echo "OUTPUT_FOLDER: $OUTPUT_FOLDER" | |
mkdir ./$OUTPUT_FOLDER |
#!/bin/bash | |
## usage: fail2ban-client-ls-ip [JAIL] | |
JAIL=$1 | |
PROGNAME=$0 | |
if [ -z $JAIL ]; then | |
[ -z $PROGNAME ] && echo "ERROR: $PROGNAME is empty" && exit 1 | |
sudo fail2ban-client status | |
#!/bin/bash | |
# | |
# usage: API_KEY=XXXX MONITOR_NAME=GOOGLE uptimerobot.sh | |
# | |
keep=$HOME/.uptimerobot-status | |
if [ -z "$MONITOR_NAME" ]; then | |
(>&2 echo "ERROR: MONITOR_NAME is required") | |
exit 1 |
[program:whoami] | |
command=/bin/bash -l -c 'echo "whoami: $(whoami)"' | |
stdout_logfile=/dev/stdout | |
startsecs = 0 | |
autorestart = false |
<VirtualHost *.:443> | |
ServerName whatever-domain.com | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
SSLProxyEngine on | |
ProxyPreserveHost on | |
RewriteEngine On |
const TreeNode = function (value) { | |
this.left = null | |
this.right = null | |
this.value = value | |
} | |
// accept muliple sorted unqiue numbers arrays | |
const buildTreeNodes = function (...arrs) { | |
let node = new TreeNode() | |
for (let i = 0; i < arrs.length; i++) { |
mkdir ~/picture-in-pictures/
/bin/bash -c 'youtube-dl --ignore-errors --yes-playlist -o "${HOME}/./picture-in-picture/%(playlist_id)s-%(playlist_index)s" `xclip -selection c -o`'
start a player instance