<button onclick="recipeVideo.currentTime=this.innerText.split(':').reverse().reduce((s,t,i)=>s+t*[1,60,3600][i],0);">0:24</button>e.g.
<video id="recipeVideo" src="my-recipe.mp4" controls></video>
<ul>| #!/bin/bash | |
| # --- | |
| # summary: List the latest played media (title and local date) from AntennaPod exported database. | |
| # about: | |
| # - url: https://antennapod.org/ | |
| # sourceCodeRepository: https://github.com/AntennaPod | |
| # version: 3.7.0f | |
| # sameAs: | |
| # - url: https://gist.github.com/monking/259c9194c2d170a1936847d28d64ea34 | |
| # - url: ~/.local/lib/antennapod-last-played--gist--259c9194c2d170a1936847d28d64ea34/antennapod-last-played.sh |
| #!/bin/bash | |
| # depends on openvpn (https://openvpn.net/) and json (npm install -g json) | |
| # WARNING: stores credentials in plain text. It would be much better not to do this... | |
| E_FAILED_DOWNLOAD=3 | |
| E_USER_ABORT=4 | |
| E_UNZIP=5 | |
| E_NOTRUNNING=6 | |
| E_ALREADYRUNNING=7 |
| #!/bin/bash | |
| # https://aws.amazon.com/premiumsupport/knowledge-center/authenticate-mfa-cli/ | |
| storage=credentialsFile | |
| while getopts et: flag; do | |
| case $flag in | |
| t) mfaToken="$OPTARG";; | |
| e) storage=env;; |
| function gcg() { # git checkout grep | |
| local branches flag git_options pattern OPTIND OPTARG | |
| git_options=() | |
| while getopts 'a' flag; do | |
| case $flag in | |
| a) git_options+=('-a');; | |
| esac | |
| done | |
| shift $((OPTIND - 1)) | |
| branches=($(git branch ${git_options[@]} | perl -pe 's#^[\*\s]*(remotes/[^/]+/)?##' | grep "$*" | sort | uniq)) |
| # Runs codeception wherever you are in a git repo | |
| # include this file in your shell with `. /path/to/codecept.sh` | |
| function codecept() { | |
| local cwd root | |
| cwd="$(pwd)" | |
| cd "./$(git rev-parse --show-cdup)" | |
| root="$(pwd)" | |
| "$root/vendor/codeception/codeception/codecept" $@ -c "$root" | |
| cd "$cwd" | |
| } |
| alias ss='PARENT_SHELL=$PARENT_SHELL:$$ $SHELL' | |
| alias ssi='PARENT_SHELL_ARRAY=(${PARENT_SHELL//:/ });echo ${PARENT_SHELL_ARRAY[@]}, ${#PARENT_SHELL_ARRAY[@]} deep' | |
| alias ssk='[[ -n $PARENT_SHELL ]] && exit || echo "You'\''re not in a subshell"' |
| o=(th st nd rd th th th th th th); | |
| for i in {1..30}; do echo espeak -w ${i}-count.wav ${i}${o[$((i%10))]}; done |
| # go to git root | |
| alias gu='cd $(git rev-parse --show-cdup)' |