FloFaber.com

Notes

Linux

for i in range

for i in {01..99}; do echo $i; done

Make Siterip

wget -mpckE --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36." -e robots=off <URL>

Limit journald disk-space

Change SystemMaxUse in /etc/systemd/journald.conf to e.G. 300M.
Then service systemd-journald restart

Changing output device in Gnome doesn't work

Bug

mv ~/.config/pulse ~/.config/pulse_old

Systemd service

https://www.freedesktop.org/software/systemd/man/systemd.service.html

Edit Registry

https://github.com/rescatux/chntpw

myip alias

alias myip="curl ifconfig.co"

standard ports list

/etc/services

flush DNS cache

systemd-resolve --flush-caches

or

resolvectl flush-caches

Writing umlauts on an english keyboard

AltGr+[ then press a,o,u,... to get the umlaut.

Remove dirty-flag from NTFS

ntfsfix -d /dev/sdx1 / mount -o remove_hiberfile /dev/...

Extract first page of PDF and save as PNG using GhostScript

for f in *.pdf; do gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=png16m -sPageList=1 -r300 -sOutputFile="${f%.*}.png" "$f"; done

gsettings workspace stuff

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['<Alt>A','<Alt>Page_Up']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "['<Alt>D','<Alt>Page_Down']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-left "['<Alt><Shift>A','<Alt><Shift>Page_Up']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-right "['<Alt><Shift>D','<Alt><Shift>Page_Down']"

gsettings.png

show nic speed

cat /sys/class/net/<iface>/speed


Windows

Show all perf-counters

typeperf -qx

Extract Embedded Windows License Key

wmic path SoftwareLicensingService get OA3xOriginalProductKey

Count Members of AD group

(Get-ADGroup "GROUP" -Properties *).Member.Count

Get Release ID with Powershell

(Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\" -Name ReleaseID).ReleaseId

Startup folder location

System-wide:

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp

Per User:

%appdata%\Microsoft\Windows\Start Menu\Programs\Startup