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"'
Benvenuto straniero - Ceci ce un blog!
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
Thursday, October 13, 2022
How to use `not` condition in the gitlab api issue query
From Gitlab issues api documentation, not
is of type Hash
. It's a special type documented here
For example to exclude the labels Category:DAST
and devops::secure
, and to exclude the milestone 13.11
, you would use the following parameters:
not[labels]=Category:DAST,devops::secure
not[milestone]=13.11
Using gitlab python module, you would need to pass some extra parameters by adding more keyword arguments:
import gitlab
gl = gitlab.Gitlab('https://gitlab.com')
extra_params = {
'not[labels]': "Category:DAST,devops::secure",
"not[milestone]": "13.11"
}
issues = gl.issues.list(all=True, scope='all', state='opened',
assignee_username='derekferguson', **extra_params)
for issue in issues:
print(issue.title)
Wednesday, September 21, 2022
Debian 11 - sudo subl /etc/apt/sources.list
deb http://deb.debian.org/debian bullseye main contrib non-free deb-src http://deb.debian.org/debian bullseye main contrib non-free deb http://deb.debian.org/debian bullseye-updates main contrib non-free deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free deb http://security.debian.org/debian-security bullseye-security main contrib non-free deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free deb http://deb.debian.org/debian bullseye-backports main contrib non-free deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free
xfce4-screenshooter keyboard shortcut
sh -c 'xfce4-screenshooter --fullscreen --save "$HOME/Pictures/Screenshots/Screenshot_$(date +%Y-%m-%d_%H:%M:%S).png"' s...
-
sudo -u www-data /usr/local/bin/composer install --no-ansi --no-dev --no-interaction --no-progress --no-scripts --optimize-autoloader
-
sh -c 'xfce4-screenshooter --fullscreen --save "$HOME/Pictures/Screenshots/Screenshot_$(date +%Y-%m-%d_%H:%M:%S).png"' s...