Useful tricks

Most of them are quite unnecessary when you have a POSIX command line (i.e. a GNU/Linux machine) available, but they may be nevertheless useful:

From an article of Shoaid Mehedi

FFMPEG to Youtube Live

video – FFMPEG to Youtube Live – Stack Overflow

After a lot of trial and error the solution below works pretty much perfectly. To make sure it runs 24/7 wrap it inside a service of some description.

This is with an up to date version of FFMPEG to include -stream_loop -1.
The background is an mp4 file.
http://localhost:3888 = an audio stream.

ffmpeg -stream_loop -1 -i $MYPATH/background/$background \
-i http://localhost:3888 -filter:a "volume=$volume" \
-r 24 -g 48 -pix_fmt yuv420p -x264-params keyint=48:min-keyint=48:scenecut=-1 \
-s $size -b:v $bitrate -b:a 128k -ar 44100 -acodec aac \
-vcodec libx264 -preset superfast -bufsize 960k -crf 28 -threads 2 \
-f flv rtmp://a.rtmp.youtube.com/live2/$key

Config File:

# Config File
background=out.mp4
size=1280x720
bitrate=1500k
key=----KEY----
volume=0.5

Design by contract in a spreadsheet!

Today I wanted to format a boolean value in a spreadsheet so that true values are shown as “Sì” and false as “No” (italian words for “yes” and “no”). I was easy as librelive describe in Change Boolean to Yes/No instead of True/False – Ask LibreOffice

i suggest basically the same as m.a.riosv wrote, but a little better:

in format cells dialogue fill format code input with the following:

[=1]"Yes";[=0]"No";General – this means it will be yes on true/1 values, no on false/0 values and will use general format otherwise.

one may even use the following string to format it as / instead of yes/no and color differentiation: [GREEN][=1]"✓";[RED][=0]"✗";[BLUE]General;[BLUE]@

this works on libreoffice calc v6.1.5.2 for ubuntu – i’ve tested

i call it “a little bit better” solution because it implements design by contract pattern, i.e. if for some unexpected reason the value will be something else than a boolean, then it will be displayed as usual, and not hidden, thus hiding a possible error in design!

But the real gem is finding a reference to design by contract!

Messaggistica a confronto

Recentemente moltissimi iniziano a maldigerire la gestione dei dati personali di WhatsApp e Facebook, così in molti rivalutano altri sistemi di messaggistica che fin’ora erano rimasti nell’ombra. Ovviamente io e molti altri preferiamo sistemi aperti e liberi ed in molti, tra cui io avevamo caldamente consigliato già da anni di usare Telegram.

Fa un po’ male leggere questa infografica dove Telegram sembra uscirne “con le ossa rotte”:

Signal lo reinstallerò, non mi piaceva il suo chiedere con insistenza il PIN ogni pochi giorni. Session non lo conoscevo, e mi incuriosisce.

Peccano non ci sia GNU Jami che non ha proprio i server (ma ne siamo così sicuri? Ho un dubbio, indagherò )