This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Usage: | |
| # ./ffmpegconcat.sh input1.mp4 input2.mp4 input3.mp4 output.mp4 | |
| # See: https://trac.ffmpeg.org/wiki/Concatenate | |
| for input in "${@:1:$#-1}"; do echo "file '$input'"; done > filelist.txt | |
| ffmpeg -f concat -safe 0 -i filelist.txt -c copy "${@: -1}" | |
| echo "Concatenated:" && cat filelist.txt && rm -f filelist.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| URL="${2}" | |
| NAME="$(echo "${URL}" | sed 's#.*/\([^/]*\)/$#\1#')" | |
| pgrep -f "/${NAME}-.*/playlist.m3u8" && exit | |
| STREAM="$(curl -s "${URL}" | grep hlsSourceFast | sed -n 's#.*\(https://.*/playlist.m3u8\).*#\1#p')" | |
| ROOT_DIR=$HOME/x | |
| case "${1}" in | |
| vlc|v) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- posts.json must be at root level --> | |
| {{ $items := getJSON "posts.json" }} | |
| {{ range $item := $items }} | |
| <a href="{{ $item.url }}">{{ $item.name }}</a> | |
| {{ end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {# Import macros for global use in all views #} | |
| {% set components = {} %} | |
| {% for component in macroFilePaths %} | |
| {% import component as temp %}{% set macro = _.assign(components, temp) %} | |
| {% endfor %} | |
| {# end #} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // Allows highlighting of code blocks in Nunjucks template. | |
| // https://mozilla.github.io/nunjucks/api.html#custom-tags | |
| // | |
| const nunjucks = require('nunjucks'); | |
| const hljs = require('highlight.js'); | |
| function HighlightJsExtension() { | |
| this.tags = ['highlightjs']; |