FloFaber.com

Notes

Linux

for i in range

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

Limit journald disk-space

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

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

show nic speed

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


Windows

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