for %f in (*.mp4) do @ffprobe -v error -of csv -show_entries format=filename:format_tags=title %f >> list.txt
ffmpeg -i <input-file> -preset fast -crf 18 -vf scale=720:-2 -an output.mp4
flags:
- scales to 720 x \
#!/usr/bin/env python | |
# | |
# renames files with date JAN_18 to "<prefix> 2018-01" | |
# darell tan 2018.09.14 | |
# | |
from __future__ import print_function | |
import sys | |
import os | |
import re |
// | |
// quick 010 Editor template for u-boot images | |
// darell tan 2018.12.08 | |
// | |
enum <uchar> IH_TYPES { | |
TYPE_INVALID, | |
TYPE_STANDALONE, | |
TYPE_KERNEL, | |
TYPE_RAMDISK, |
<!-- PIN entry animation --> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body> | |
<style> | |
.h { | |
position: relative; |
data:text/html,<script>setInterval("d = new Date(); document.body.innerHTML = `<h1>${d.getHours()}:${d.getMinutes()}:${d.getSeconds()}`", 500);</script><body> |
#!/bin/sh | |
# run as root | |
apt remove cloud-init unattended-upgrades popularity-contest landscape-common update-manager-core | |
apt autoremove | |
# disable upgrade units & timers | |
systemctl disable --now apt-daily{,-upgrade}.{timer,service} |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body> | |
<style> | |
* { font-family: sans-serif; font-size: 16px; } | |
input { font-family: monospace; } | |
input[readonly] { border: 1px solid #eee; } | |
div.row { padding: .8em 0; } |
#!/bin/sh | |
# script to make mp4 videos start fast | |
# (i.e. shifting their moov atoms to the front) | |
FNAME=$1 | |
[ -f "$FNAME" ] || exit 1 | |
TMPFNAME=`mktemp -u ${FNAME}.XXXXXX` | |
head -c128 "$FNAME" | grep -F moov -q |
// strip query string (or search params) from "/xyz/..". URLs | |
for (let a of document.querySelectorAll('a[href^="/xyz/"]')) { | |
let u = new URL(a.href.toString()); | |
u.search = ''; | |
a.href = u; | |
} |
# | |
# awk one-liner to replace patterns like "<? cmd ?>" by executing cmd | |
# handy for use in config files "templates" | |
# | |
cat <<EOF | awk '{ if (match($0, /<\?(.*)?>/)) { cmd = substr($0, RSTART+2, RLENGTH-2-2); system(cmd) } else print }' | |
my directory has these files: | |
<? ls / ?> | |
EOF |