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
### Basic ### | |
# The directory to store the downloaded file. | |
dir=${HOME}/Downloads | |
# Downloads the URIs listed in FILE. | |
input-file=${HOME}/.aria2/aria2.session | |
# Save error/unfinished downloads to FILE on exit. | |
save-session=${HOME}/.aria2/aria2.session | |
# Save error/unfinished downloads to a file specified by --save-session option every SEC seconds. If 0 is given, file will be saved only when aria2 exits. Default: 0 | |
save-session-interval=60 | |
# Set the maximum number of parallel downloads for every queue item. See also the --split option. Default: 5 |
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']; |