things
FFMPEG TIME: Trim the First 5 Seconds of the Audio and Combine with Video (will be silenced 5 sec): ffmpeg -i "VIDEO.mkv" -i "AUDIO.flac" -c:v libx264 -c:a aac -map 0:v -map 1:a -af "atrim=start=5" -shortest "output_with_shifted_audio.mp4" Remove Original…
This media is not supported in your browser
VIEW IN TELEGRAM
alternative method for resizing *.qcow2:
qemu-img info nix_disk.qcow2
qemu-img resize nix_disk.qcow2 +30G
virt-sparsify --in-place nix_disk.qcow2
qemu-img info disk.qcow2
qemu-img info nix_disk.qcow2
sudo modprobe nbd max_part=10
sudo qemu-nbd -c /dev/nbd0 nix_disk.qcow2
gparted /dev/nbd0
sudo qemu-nbd -d /dev/nbd0
ffmpeg -ignore_loop 0 -i "ghostsaibu - 1774814925807894552.gif" -i "CHVRCHES - Deliverance (Official Instrumental).mp3" -vf "scale=trunc(iw/2)*4:trunc(ih/2)*4" -sws_flags neighbor -vcodec libx265 -preset medium -tune animation -acodec aac -b:a 192k -shortest -t 00:00:30 video.mp4
another 101 way to make gif+sound=mp4
Determining processor & platform:
LD_SHOW_AUXV=1 $(which true) | grep _PLATFORM
Search all files for HEX pattern "E831" recursively in current dir:
ug --all --hexdump -U 'E831' -r $(pwd)
🥰1
Yes, the GCC oneliner
exec 5>$(mktemp) && printf "main(){write(1,\"haiiiiiiihelloooooohaiiiiiii\",29);}" | gcc -std=c89 -xc -o /dev/fd/5 - 2>/dev/null && /lib64/ld-linux-x86-64.so.2 /dev/fd/5This media is not supported in your browser
VIEW IN TELEGRAM
freaked interfaces №43
This media is not supported in your browser
VIEW IN TELEGRAM
freaked interfaces №44
cb.c
1.4 KB
smol useful prog that will send to clipboard piped content
usage:
then
example:
usage:
gcc -o cb cb.c $(pkg-config --cflags --libs gtk+-3.0) && chmod +x cb && sudo cp cb /usr/local/bin/
then
any command with output | cb
example:
find /tmp | cb
Irregular alternative to heredoc cat using bare /dev/stdin:
cp /dev/stdin /tmp/plaintext.txt << EOF
some
multiline
text
test
test
EOF
A way to make a full disk backup of WIN* (NTFS partition):
backup:
restore:
backup:
~/trash $ cat save-image.sh
ntfsclone --save-image -o - /dev/sdb1 | zstd -9 -o /run/media/host/old2.52/WIN8.1BKUPS/sdb1-DEFRAG-ACT-NVIDIA-OPTI-11AUG2021.img
restore:
~/trash $ cat restore-images.sh
zstdcat /run/media/host/old2.52/WIN8.1BKUPS/SELEECT |ntfsclone --restore-image --overwrite /dev/SELEECT -
bash forkbomb not working there:
systemd-run --user --unit=safe-fork \
--property=MemoryMax=1G \
--property=CPUQuota=10% \
--property=TasksMax=3 \
--property=TimeoutSec=3 \
--pty /bin/bash
best compression using ZPAQ
(its very slow, but compression ratio around 30% better than ZST )
lrzip -z -L 9 -U -p $(nproc) <file>
(its very slow, but compression ratio around 30% better than ZST )
ZST variant:
zstd --ultra -22 --long=16 -T$(nproc) -v storage.qcow2 -o storage_$(date +%Y%m%d)_.qcow2.zst
zstd --ultra -22 --long=16 -T$(nproc) -v system.qcow2 -o system_$(date +%Y%m%d)_.qcow2.zst
Get TUI weather from the Norway telnet service:
OR pure bash TCP ver:
If it doesn't work, try different city names.
It looks like their backend is hitting bugs.
Internal server error.
printf 'Kyiv\r\n' | nc graph.no 79
OR pure bash TCP ver:
exec 3<>/dev/tcp/graph.no/79
printf 'Kyiv\r\n' >&3
cat <&3
exec 3>&-
It looks like their backend is hitting bugs.
Internal server error.