8. 9. 2025
pdftocairo is part of the poppler-utils package.
pdftocairo -png -transp -scale-to 2048 in.pdf out
Larger of width or height will be scaled to 2048px.
Output will be series of png’s, like:
out-01.png
out-02.png
out-03.png
...
Man page.
4. 9. 2025
Creating a PERSISTENT Progress Bar on the Terminal with Bash! v2 Progress Bar
video:
https://www.youtube.com/watch?v=r2rbAvXMcXQ
source:
https://github.com/bahamas10/ysap/blob/main/code/2025-09-03-progress-bar-2/progress-bar
Nice ‘fatal’ function imho:
fatal() {
echo '[FATAL]' "$@" >&2
exit 1
}
Why not a bar with higher resolution?
# one block is 8 possible parts, 12.5 % in each
#U+2588 █ Full block 100 %
#U+2589 ▉ Left seven eighths block 87.5 %
#U+258A ▊ Left three quarters block 75 %
#U+258B ▋ Left five eighths block 62.5 %
#U+258C ▌ Left half block 50 %
#U+258D ▍ Left three eighths block 37.5 %
#U+258E ▎ Left one quarter block 25 %
#U+258F ▏ Left one eighth block 12.5 %
2. 9. 2025
https://www.bowerbyte.com/posts/blocky-planet
https://news.ycombinator.com/item?id=45055205
Quote:
It took me a little over a month to code, during which time I was able to dedicate about 15 hours per week. I did have previous experience with voxels, so the main challenge was just making it spherical. Ironically, it took over twice as long to write/illustrate this blog post.
1. 9. 2025
How I went from 500 to 2000 in Chess with THE PIRC DEFENSE
https://www.youtube.com/watch?v=PZDVgiq2q8M
Really neatly executed over the range.
27. 8. 2025
Why ALAC and script
Lossless audio compression in format that Premiere Pro can open directly:
ffmpeg -i song.wav -c:a alac song.alac.m4a
The usual toALAC script.
On a sample of 56 random songs ALAC compressed audio is 66.67% the size of original wavs.
Alt script with ‘jobs’
Instead of ‘jobcount’ counter variable, built-in ‘jobs’ shell command is used to control concurrency ‘logic’.
#!/bin/bash
# toALAC with concurrency
# 'jobs' version
# 2025, writen mostly by chatgpt
# usage: toALAC *.wav
if [ $# -eq 0 ]; then
echo "Usage: toALAC *.wav"
exit 1
fi
trap "echo -e '\nAborted by user.'; kill 0" INT
MAX_JOBS=4
# main loop
for f in "$@"; do
[ -f "$f" ] || continue
out="${f%.*}.alac.m4a"
echo "Encoding: $f -> $out"
ffmpeg -y -hide_banner -loglevel quiet -i "$f" -c:a alac "$out" &
# If we've hit the max, wait for one job to finish
(( $(jobs -p | wc -l) >= MAX_JOBS )) && wait -n
done
wait
echo "All encodes finished."
Speed
Script makes 4 encodes at once, which seems to achive rougly the same speed as bumping that to 8, also using gnu parallel instead of plain bash logic will not speed up encoding on this particular testing machine.
Size and speed of ALAC vs FLAC
FLAC default comes out as 61.11%. FLAC file-by-file encoding is much slower than ALAC, taking 2m45s to finish, compared to ALAC in 1m40s.
p.s. ffmpeg ALAC vs standalone FLAC tested.
23. 8. 2025
Tutorial
https://www.youtube.com/watch?v=PhdEk_RxkGQ
keywords: COLMAP, GLOMAP, automated 3d tracking, ffmpeg, bat script, Blender Photogrammetry Importer, windows.
What are things
COLMAP is a general-purpose Structure-from-Motion (SfM) and Multi-View Stereo (MVS) pipeline with a graphical and command-line interface. It offers a wide range of features for reconstruction of ordered and unordered image collections. The software is licensed under the new BSD license.
GOLMAP = faster version of COLMAP