MacOS (zsh)

Reset Quicklook cache

qlmanage -r cache \
killall Dock
killall finder

Edit zshrc

nano ~/.zshrc
/sbin/fsck_hfs -fy /dev/disk2

Homebrew

Install Wine

brew tap homebrew/cask-versions

Useful shit from an old job

  • sysctl -n machdep.cpu.brand_string

    • gets cpu name string with clock speed

  • echo $(expr sysctl -n hw.memsize / $((1024**3)))

    • gets memory size in GB

  • df -H

    • disk sizes - reference the largest one

  • /Volumes/Install\\ macOS\\ Big\\ Sur/Install\\ macOS\\ Big\\ Sur.app/Contents/MacOS/InstallAssistant

    • runs installer from disk

    • use tabs after writing a couple letters of each folder to autofill

  • pwpolicy -u <shortusername> -setpolicy "newPasswordRequired=1"

Last updated