Skip to content

Instantly share code, notes, and snippets.

@andrew-s
andrew-s / get_m2ts.sh
Created January 7, 2021 10:06
Grab m2ts titles while playing a Bluray with VLC
#!/bin/bash
vlc_pid=$(pgrep VLC)
last_title=""
compiled_titles=""
echo "Starting loop..."
echo "Press [Q] when the title has finished..."
while true; do
#!/bin/bash
function conv {
echo "Processing: ${1}"
docker run -i -t -v ${PWD}:/files --rm=true -u="0" jedimonkey/avconv avconv -i "/files/${1}" "/files/${1%%.wma}.flac"
}
IFS=$'\n'; set -f
for f in $(find ./ -name '*.wma'); do conv "$f"; done
unset IFS; set +f
@andrew-s
andrew-s / php-extensions.sh
Last active July 16, 2018 22:13
Install Phalcon on Alpine PHP (7+) Docker Images
#!/bin/sh
echo "Installing PHP extensions"
docker-php-ext-install pdo_mysql
# Install Phalcon
PHALCON_VERSION=3.4.0
PHALCON_EXT_PATH=php7/64bits
set -xe && \