things – Telegram
things
37 subscribers
31 photos
13 videos
10 files
8 links
random 4 u
Download Telegram
VOTV max performance settings for GTX950
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
Check installed packages with pacutils:

 paccheck --md5sum --quiet
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/5
cb.c
1.4 KB
smol useful prog that will send to clipboard piped content

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:

~/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

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:
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>&-



If it doesn't work, try different city names.
It looks like their backend is hitting bugs.
Internal server error.
calculate PI to 5000 decimal places:

time echo "scale=5000; 4*a(1)" | bc -l -q


same for Euler (exponential func):

time echo "scale=5000; e(1)" | bc -l -q
The SSH protocol
👍1
General Email Regex (RFC 5322 Official Standard)

(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])
1
(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])
🥰1
not perfect keyboard & mice cleaning solution (its temporary disable hid devices from input)

set proper sleep time:


#DEVICES=($(for d in /sys/bus/usb/devices/[0-9]*; do ([ -e "$d/driver" ] && readlink "$d/driver" 2>/dev/null | grep -q "usbhid\|hid") || ([ -d "$d" ] && ls $d/*/input* >/dev/null 2>&1) && echo "$d"; done | sed 's/:.*$//' | sort -u)); for dev in "${DEVICES[@]}"; do sudo bash -c "echo 0 > $dev/authorized" & done; wait; sleep 3; for dev in "${DEVICES[@]}"; do sudo bash -c "echo 1 > $dev/authorized" & done; wait



broken rn do not use this noscript.