Documentations

Those who don’t understand Unix are condemned to reinvent it, poorly.
Henry Spencer, in Introducing Regular Expressions (2012) by Michael Fitzgerald, via wikiquote entry on Unix
Saturating the name-space
We are saturating the name space for programming languages. These days I discovered the Odin Programming Language “”The Data-Oriented Language for Sane Software Development.” According to its FAQs there are some things we may learn for Eiffel.
Continue readingCamminare per dimagrire: 9 segreti per bruciare davvero i grassi
Continue readingCamminare per dimagrire: 9 segreti per bruciare davvero i grassi
Camminare è il miglior modo per dimagrire, ma occorre rispettare alcune regole: 9 consigli per bruciare davvero i grassi senza soffrire.
Telegram emoji list with codes and descriptions – K3A
After almost 2 years of using Telegram, I finally discovered that it is possible to enter emoji using its name after “:” character. Unfortunately I couldn’t find any complete list of available emojis anywhere, so I had to dig deep into the Telegram desktop source code to generate it. It was far more complicated than
…
Code changes and relevant files are available in this repo: https://github.com/k3a/telegram-emoji-list.
Source: Telegram emoji list with codes and descriptions – K3A
Flutter resources:
Flutter resources:
- Wonderous (web demo, App Store, Google Play, source code):
A Flutter app that showcases Flutter’s support for elegant design and rich animations. - Material 3 Demo (web demo, source code):
A Flutter app that showcases Material 3 features in the Flutter Material library. - Flutter Samples (samples, source code):
A collection of open source samples that illustrate best practices for Flutter. - Widget catalogs (Material, Cupertino):
Catalogs for Material, Cupertino, and other widgets available for use in UI.
Applicazioni da remoto
Oh, dimenticavo di aver già scritto di waypipe, a proposito dei giochi 3d. Quasi 5 anni fa!
Ora la parte noiosa. Spesso mi collego (con ssh, ça va san dire) alle mie macchine di casa da remoto dove è già attiva una sessione “desktop” che oggigiorno è Wayland. Così qualsiasi programma Gnome o che usa le librerie Gtk – cioè moltissimi – verrà visualizzato sul desktop Wayland e non sul dektop remoto.
“waypipe ssh $HOST
” funziona a meraviglia, ma l’aggiunta di queste righe al vostro .bashrc
è utile quando non state usando una sessione Wayland (cioè Windows):
if [ -n "$SSH_CLIENT" ]; then
if [ -n "$WAYLAND_DISPLAY" ]; then
echo "Remote session with waypipe, everything will be OK"
else
echo "Remote session, forcing GTK to X11"
export GDK_BACKEND=x11
fi
fi
Network transparency with Wayland (bis)
Oh, I forgot I already wrote about waypipe, regarding 3d games. Almost 5 years ago!
Now the boring part. If you log into a machine where a Wayland session is already active – I often log into my home machines remotely – any Gtk program will show on the Wayland desktop. So you use “waypipe ssh $HOST
” which is cool and works like a breeze but adding those lines to your .bashrc helps when you are not using a wayland session (i.e. Windows):
if [ -n "$SSH_CLIENT" ]; then
if [ -n "$WAYLAND_DISPLAY" ]; then
echo "Remote session with waypipe, everything will be OK"
else
echo "Remote session, forcing GTK to X11"
export GDK_BACKEND=x11
fi
fi
How to download all PDF files linked from a single page using wget
You can use wget to download all PDFs from a webpage by using:
wget -r -l1 -H -t1 -nd -N -np -A.pdf -erobots=off --wait=2 --random-wait --limit-rate=20k [URL]
- -r: Recursive download.
- -l1: Only one level deep (i.e., only files directly linked from this page).
- -H: Span hosts (follow links to other hosts).
- -t1: Number of retries is 1.
- -nd: Don’t create a directory structure, just download all the files into the current directory.
- -N: Turn on timestamping.
- -np: Do not follow links to parent directories.
- -A.pdf: Accept only files that end with .pdf.
- -erobots=off: Ignore the robots.txt file (use carefully, respecting site’s terms and conditions).
- –wait=2: Wait 2 seconds between each retrieval.
- –random-wait: Wait from 0.5 to 1.5 * –wait seconds between retrievals.
- –limit-rate=20k: Limit the download rate to 20 kilobytes per second.
This parameters will avoid the “429: Too Many Requests” error.
Source: How to download all PDF files linked from a single page using wget
imagemagick reduce size of pdf
convert -density 150 -quality 60 -compress jpeg Test.pdf Test-150-060-jpeg.pdf