Tricks – Paolo Redaelli https://monodes.com/predaelli A civil engineer with a longlife fondness for Software Libero Fri, 11 Apr 2025 22:05:00 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.2 91795679 Camminare per dimagrire: 9 segreti per bruciare davvero i grassi https://monodes.com/predaelli/2025/04/12/camminare-per-dimagrire-9-segreti-per-bruciare-davvero-i-grassi/ https://monodes.com/predaelli/2025/04/12/camminare-per-dimagrire-9-segreti-per-bruciare-davvero-i-grassi/#respond Fri, 11 Apr 2025 22:04:57 +0000 https://monodes.com/predaelli/?p=13085

Camminare 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.

]]>
https://monodes.com/predaelli/2025/04/12/camminare-per-dimagrire-9-segreti-per-bruciare-davvero-i-grassi/feed/ 0 13085
Telegram emoji list with codes and descriptions – K3A https://monodes.com/predaelli/2025/03/26/telegram-emoji-list-with-codes-and-descriptions-k3a/ https://monodes.com/predaelli/2025/03/26/telegram-emoji-list-with-codes-and-descriptions-k3a/#respond Wed, 26 Mar 2025 15:22:46 +0000 https://monodes.com/predaelli/?p=12998

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

]]>
https://monodes.com/predaelli/2025/03/26/telegram-emoji-list-with-codes-and-descriptions-k3a/feed/ 0 12998
Network transparency with Wayland (bis) https://monodes.com/predaelli/2025/03/07/network-transparency-with-wayland-bis/ https://monodes.com/predaelli/2025/03/07/network-transparency-with-wayland-bis/#respond Fri, 07 Mar 2025 16:54:29 +0000 https://monodes.com/predaelli/?p=12922 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

]]>
https://monodes.com/predaelli/2025/03/07/network-transparency-with-wayland-bis/feed/ 0 12922
How to download all PDF files linked from a single page using wget https://monodes.com/predaelli/2025/03/06/how-to-download-all-pdf-files-linked-from-a-single-page-using-wget/ https://monodes.com/predaelli/2025/03/06/how-to-download-all-pdf-files-linked-from-a-single-page-using-wget/#respond Thu, 06 Mar 2025 17:58:00 +0000 https://monodes.com/predaelli/?p=12892

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

]]>
https://monodes.com/predaelli/2025/03/06/how-to-download-all-pdf-files-linked-from-a-single-page-using-wget/feed/ 0 12892
imagemagick reduce size of pdf https://monodes.com/predaelli/2025/03/04/imagemagick-reduce-size-of-pdf/ https://monodes.com/predaelli/2025/03/04/imagemagick-reduce-size-of-pdf/#respond Tue, 04 Mar 2025 00:36:53 +0000 https://monodes.com/predaelli/?p=12887

convert -density 150 -quality 60 -compress jpeg Test.pdf Test-150-060-jpeg.pdf

Source: imagemagick reduce size of pdf – Stack Overflow

]]>
https://monodes.com/predaelli/2025/03/04/imagemagick-reduce-size-of-pdf/feed/ 0 12887
How to add a directory to your PATH https://monodes.com/predaelli/2025/02/24/how-to-add-a-directory-to-your-path/ https://monodes.com/predaelli/2025/02/24/how-to-add-a-directory-to-your-path/#respond Mon, 24 Feb 2025 19:19:00 +0000 https://monodes.com/predaelli/?p=12856 How to add a directory to your PATH? I naïvely answered export PATH=A_DIRECTORY:$PATH

Well, after reading How to add a directory to your PATH written by Julia Evans I know that it is not as simple as it seems!

]]>
https://monodes.com/predaelli/2025/02/24/how-to-add-a-directory-to-your-path/feed/ 0 12856
How to Share Virtual Extended Screen https://monodes.com/predaelli/2025/02/14/how-to-share-virtual-extended-screen/ https://monodes.com/predaelli/2025/02/14/how-to-share-virtual-extended-screen/#respond Fri, 14 Feb 2025 15:00:07 +0000 https://monodes.com/predaelli/?p=12744  

How to Share Virtual Extended Screen in Ubuntu 22.04 | 24.04

]]>
https://monodes.com/predaelli/2025/02/14/how-to-share-virtual-extended-screen/feed/ 0 12744
Guida ad Internet per tiranni https://monodes.com/predaelli/2025/01/16/guida-ad-internet-per-tiranni/ https://monodes.com/predaelli/2025/01/16/guida-ad-internet-per-tiranni/#respond Thu, 16 Jan 2025 19:28:00 +0000 https://monodes.com/predaelli/?p=12283 a[data-mtli~="mtli_filesize18178kB"]:after {content:" (181.78 kB)"}Cassandra Crossing 256/ Guida ad Internet per tiranni riporta un collegamento a http://assets.pwd.io/pwd/media/Guida_per_dittatori.pdf e http://assets.pwd.io/pwd/media/Guida_per_dittatori.txt conservato su archive.org. Ora siccome archive.org…]]> Cassandra Crossing 256/ Guida ad Internet per tiranni riporta un collegamento a http://assets.pwd.io/pwd/media/Guida_per_dittatori.pdf e http://assets.pwd.io/pwd/media/Guida_per_dittatori.txt conservato su archive.org. Ora siccome archive.org è sempre fin troppo oberato mi sembra opportuno copiare qui

]]>
https://monodes.com/predaelli/2025/01/16/guida-ad-internet-per-tiranni/feed/ 0 12283
Git: Copy a file or directory from another repository preserving the history https://monodes.com/predaelli/2024/09/01/git-copy-a-file-or-directory-from-another-repository-preserving-the-history/ https://monodes.com/predaelli/2024/09/01/git-copy-a-file-or-directory-from-another-repository-preserving-the-history/#respond Sat, 31 Aug 2024 22:23:45 +0000 https://monodes.com/predaelli/?p=11886

How to copy a file or directory from another GIT repository while preserving its history?

Internet is full of magic formulas each one more complex.

Here I’m proposing a much simpler and faster one that is to make a git format-patch for the entire history of the file or subdirectory that we want and then import it into the destination repository.

mkdir /tmp/mergepatchs
cd ~/repo/org
export reposrc=myfile.c #or mydir
git format-patch -o /tmp/mergepatchs $(git log $reposrc|grep ^commit|tail -1|awk '{print $2}')^..HEAD $reposrc
cd ~/repo/dest
git am /tmp/mergepatchs/*.patch

Simple and fast :)

Source synaptic fault http://blog.neutrino.es/2012/git-copy-a-file-or-directory-from-another-repository-preserving-history/ ]]>
https://monodes.com/predaelli/2024/09/01/git-copy-a-file-or-directory-from-another-repository-preserving-the-history/feed/ 0 11886
Audio oh, audio https://monodes.com/predaelli/2024/08/07/audio-oh-audio/ https://monodes.com/predaelli/2024/08/07/audio-oh-audio/#respond Wed, 07 Aug 2024 20:21:12 +0000 https://monodes.com/predaelli/?p=11852 As I tend to meddle a lot more than necessary with my strange machine which is stable/testing/unstable and somehow experimental I tend to mess it up. So today I had to issue

systemctl --user restart pipewire.service

to get audio back on my Gnome desktop

]]>
https://monodes.com/predaelli/2024/08/07/audio-oh-audio/feed/ 0 11852