|
|
|
@ -353,6 +353,9 @@ Network Manager: |
|
|
|
Chrony integration: |
|
|
|
trizen -S https://aur.archlinux.org/networkmanager-dispatcher-chrony.git/ |
|
|
|
|
|
|
|
Display wifi password for current SSID: |
|
|
|
nmcli device wifi show-password |
|
|
|
|
|
|
|
Power saving : |
|
|
|
echo "vm.dirty_writeback_centisecs = 6000" >> /etc/sysctl.d/dirty.conf |
|
|
|
echo "vm.laptop_mode = 5" >> /etc/sysctl.d/laptop.conf |
|
|
|
@ -369,6 +372,12 @@ Use scanner from command line |
|
|
|
Example to scan US letter in good quality |
|
|
|
scanimage --device "plop" --resolution 300 --format jpeg -y 280 --mode Color > whatevs.jpg |
|
|
|
|
|
|
|
Setup printer |
|
|
|
HP: |
|
|
|
Use hplip's interactive CLI to configure CUPS (USB/Network): |
|
|
|
hp-setup -i |
|
|
|
|
|
|
|
|
|
|
|
Remote presentation tool: |
|
|
|
ssh <slides-machine> |
|
|
|
while read -r; do DISPLAY=:0 xdotool getactivewindow key space; done |
|
|
|
@ -863,6 +872,25 @@ Android: |
|
|
|
# https://toot.party/@SigmaOne/106159205703917847 |
|
|
|
Custom NotoColorEmoji.ttf in /system/fonts/ |
|
|
|
|
|
|
|
Make SIP call from the default phone app: |
|
|
|
# https://shkspr.mobi/blog/2020/07/adding-sip-calls-to-android-for-free/ |
|
|
|
Phone > Settings > Call Settings > SIP accounts |
|
|
|
|
|
|
|
Rip an ebook (or any paginated document) from android (quick and dirty): |
|
|
|
# By Terence Eden |
|
|
|
# https://shkspr.mobi/blog/2021/12/quick-and-dirty-way-to-rip-an-ebook-from-android/ |
|
|
|
screenshot script: |
|
|
|
#!/bin/bash |
|
|
|
for i in {00001..00555}; do |
|
|
|
adb exec-out screencap -p > $i.png |
|
|
|
adb shell input tap 1000 2000 |
|
|
|
sleep 1s |
|
|
|
done |
|
|
|
echo All done |
|
|
|
|
|
|
|
Use mogrify to crop and trim as needed. |
|
|
|
Use pdfsandwich or ocrmypdf to add OCR info. |
|
|
|
|
|
|
|
Fix: Failed to activate service 'org.freedesktop.login1': timed out: |
|
|
|
If dbus has been restarted, don't forget to restart elogind/systemd-logind |
|
|
|
|
|
|
|
@ -920,6 +948,21 @@ ssh: |
|
|
|
from server: |
|
|
|
ssh -p 2222 <user>@127.0.0.1 |
|
|
|
|
|
|
|
Transfer files without using ssh/scp: |
|
|
|
# Credits: @Chapoline, @britaliope |
|
|
|
Server-side (untars in current directory): |
|
|
|
# directory |
|
|
|
nc -l -p 1234 | openssl enc -aes-256-cbc -d -iter 1000 | tar -xzf - |
|
|
|
# file |
|
|
|
nc -l -p 1234 | openssl enc -aes-256-cbc -d -iter 1000 | gunzip - > <file> |
|
|
|
Client-side: |
|
|
|
# directory |
|
|
|
tar -zc <dir> -c | openssl enc -aes-256-cbc -e -iter 1000 | nc <ip> 1234 -q 1 |
|
|
|
# file |
|
|
|
gzip <file> -c | openssl enc -aes-256-cbc -e -iter 1000 | nc <ip> 1234 -q 1 |
|
|
|
# Both need the same passphrase in stdin |
|
|
|
|
|
|
|
|
|
|
|
Run MSVC on linux with Wine: |
|
|
|
As seen on the internet, not tested: |
|
|
|
https://hackernoon.com/a-c-hello-world-and-a-glass-of-wine-oh-my-263434c0b8ad |
|
|
|
|