sh -c 'xfce4-screenshooter --fullscreen --save "$HOME/Pictures/Screenshots/Screenshot_$(date +%Y-%m-%d_%H:%M:%S).png"' sh -c 'xfce4-screenshooter --window --save "$HOME/Pictures/Screenshots/Screenshot_$(date +%Y-%m-%d_%H:%M:%S).png"'
Tuesday, November 28, 2023
xfce4-screenshooter keyboard shortcut
Monday, November 27, 2023
Parallel compression using Pigz
#no compression tar --use-compress-program="pigz -k -0 " -cf dir.tar.gz dir #best compression tar --use-compress-program="pigz -k -11 " -cf dir.tar.gz dir #uncompress unpigz dir.tar.gz
Wednesday, October 18, 2023
Debian 12 - sudo vim /etc/apt/sources.list
deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware deb-src http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware deb-src http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware deb http://security.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware deb-src http://security.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware deb http://deb.debian.org/debian/ bookworm-backports main contrib non-free non-free-firmware deb-src http://deb.debian.org/debian/ bookworm-backports main contrib non-free non-free-firmware
Tuesday, June 20, 2023
Javascript async defer
Both async
and defer
have one common thing: downloading of such scripts doesn’t block page rendering. So the user can read page content and get acquainted with the page immediately.
But there are also essential differences between them:
Order | DOMContentLoaded | |
---|---|---|
async | Load-first order. Their document order doesn’t matter which loads first runs first | Irrelevant. May load and execute while the document has not yet been fully downloaded. That happens if scripts are small or cached, and the document is long enough. |
defer | Document order (as they go in the document). | Execute after the document is loaded and parsed (they wait if needed), right before DOMContentLoaded . |
In practice, defer
is used for scripts that need the whole DOM and/or their relative execution order is important.
And async
is used for independent scripts, like counters or ads. And their relative execution order does not matter.
Please note: if you’re using defer
or async
, then user will see the page before the script loads.
In such case, some graphical components are probably not initialized yet.
Don’t forget to put “loading” indication and disable buttons that aren’t functional yet. Let the user clearly see what he can do on the page, and what’s still getting ready.
Tuesday, January 10, 2023
Git get all remote branches
git branch -r \ | grep -v '\->' \ | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" \ | while read remote; do \ git branc...
-
sh -c 'xfce4-screenshooter --fullscreen --save "$HOME/Pictures/Screenshots/Screenshot_$(date +%Y-%m-%d_%H:%M:%S).png"' s...
-
Known Issues Firefox 3.5 will only support color profiles as specified by ICC v2, later versions will add su...