Commit c200513119
Unregistered key
Layout: unified · split
content/garden/macos.org added +129
| @@ -0,0 +1,129 @@ | ||
| 1 | #+title: macOS | |
| 2 | #+slug: macos | |
| 3 | #+description: All about the macOS operating system. | |
| 4 | #+date: [2026-02-21 Sat 14:01:32] | |
| 5 | ||
| 6 | * Delete Annoying ~.DS_Store~ Files | |
| 7 | ||
| 8 | A simple command, using ~fd~ to clean up all ~.DS_Store~ files in any directory. | |
| 9 | ||
| 10 | #+begin_src sh | |
| 11 | # Run the command directly | |
| 12 | fd -H '.DS_Store' -t f -x rm | |
| 13 | ||
| 14 | # Or, create an alias for it | |
| 15 | alias xclean="fd -H '.DS_Store' -t f -x rm" | |
| 16 | xclean | |
| 17 | #+end_src | |
| 18 | ||
| 19 | * Hardening macOS | |
| 20 | ||
| 21 | Ref: [[https://github.com/drduh/macOS-Security-and-Privacy-Guide/blob/master/README.md][macOS Security and Privacy Guide]] | |
| 22 | ||
| 23 | #+begin_src sh | |
| 24 | # Generalize computer name | |
| 25 | sudo scutil --set ComputerName MacBook | |
| 26 | sudo scutil --set LocalHostName MacBook | |
| 27 | ||
| 28 | # Enable firewall | |
| 29 | sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on | |
| 30 | sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on | |
| 31 | sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setallowsigned off | |
| 32 | sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setallowsignedapp off | |
| 33 | sudo pkill -HUP socketfilterfw | |
| 34 | ||
| 35 | # Use Homebrew for software management | |
| 36 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| 37 | brew analytics off | |
| 38 | brew update && brew upgrade | |
| 39 | ||
| 40 | # Use a secure and private browser(s) | |
| 41 | ## Harden these manually after installing | |
| 42 | brew install --cask tor-browser ungoogled-chromium firefox | |
| 43 | ||
| 44 | # Use a secure and private messenger | |
| 45 | ## Signal; XMPP (e.g., Monal); Matrix (e.g., Element) | |
| 46 | brew install --cask signal monal element | |
| 47 | ||
| 48 | # GPG | |
| 49 | ## Install | |
| 50 | brew install gnupg | |
| 51 | ## Use recommended settings | |
| 52 | curl -o ~/.gnupg/gpg.conf https://raw.githubusercontent.com/drduh/config/main/gpg.conf | |
| 53 | ||
| 54 | # Delete Metadata | |
| 55 | ## Bluetooth | |
| 56 | sudo defaults delete /Library/Preferences/com.apple.Bluetooth.plist DeviceCache | |
| 57 | sudo defaults delete /Library/Preferences/com.apple.Bluetooth.plist IDSPairedDevices | |
| 58 | sudo defaults delete /Library/Preferences/com.apple.Bluetooth.plist PANDevices | |
| 59 | sudo defaults delete /Library/Preferences/com.apple.Bluetooth.plist PANInterfaces | |
| 60 | sudo defaults delete /Library/Preferences/com.apple.Bluetooth.plist SCOAudioDevices | |
| 61 | ## CUPS | |
| 62 | sudo rm -rfv /var/spool/cups/c0* | |
| 63 | sudo rm -rfv /var/spool/cups/tmp/* | |
| 64 | sudo rm -rfv /var/spool/cups/cache/job.cache* | |
| 65 | ## Connections | |
| 66 | sudo defaults delete /Users/$USER/Library/Preferences/com.apple.iPod.plist "conn:128:Last Connect" | |
| 67 | sudo defaults delete /Users/$USER/Library/Preferences/com.apple.iPod.plist Devices | |
| 68 | sudo defaults delete /Library/Preferences/com.apple.iPod.plist "conn:128:Last Connect" | |
| 69 | sudo defaults delete /Library/Preferences/com.apple.iPod.plist Devices | |
| 70 | sudo rm -rfv /var/db/lockdown/* | |
| 71 | ## Quicklook | |
| 72 | rm -rfv $(getconf DARWIN_USER_CACHE_DIR)/com.apple.QuickLook.thumbnailcache/exclusive | |
| 73 | rm -rfv $(getconf DARWIN_USER_CACHE_DIR)/com.apple.QuickLook.thumbnailcache/index.sqlite | |
| 74 | rm -rfv $(getconf DARWIN_USER_CACHE_DIR)/com.apple.QuickLook.thumbnailcache/index.sqlite-shm | |
| 75 | rm -rfv $(getconf DARWIN_USER_CACHE_DIR)/com.apple.QuickLook.thumbnailcache/index.sqlite-wal | |
| 76 | rm -rfv $(getconf DARWIN_USER_CACHE_DIR)/com.apple.QuickLook.thumbnailcache/resetreason | |
| 77 | rm -rfv $(getconf DARWIN_USER_CACHE_DIR)/com.apple.QuickLook.thumbnailcache/thumbnails.data | |
| 78 | sudo rm -rfv $(getconf DARWIN_USER_CACHE_DIR)/com.apple.QuickLook.thumbnailcache/thumbnails.fraghandler | |
| 79 | sudo rm -rfv $(getconf DARWIN_USER_CACHE_DIR)/com.apple.QuickLook.thumbnailcache/exclusive | |
| 80 | sudo rm -rfv $(getconf DARWIN_USER_CACHE_DIR)/com.apple.QuickLook.thumbnailcache/index.sqlite | |
| 81 | sudo rm -rfv $(getconf DARWIN_USER_CACHE_DIR)/com.apple.QuickLook.thumbnailcache/index.sqlite-shm | |
| 82 | sudo rm -rfv $(getconf DARWIN_USER_CACHE_DIR)/com.apple.QuickLook.thumbnailcache/index.sqlite-wal | |
| 83 | sudo rm -rfv $(getconf DARWIN_USER_CACHE_DIR)/com.apple.QuickLook.thumbnailcache/resetreason | |
| 84 | sudo rm -rfv $(getconf DARWIN_USER_CACHE_DIR)/com.apple.QuickLook.thumbnailcache/thumbnails.data | |
| 85 | sudo rm -rfv $(getconf DARWIN_USER_CACHE_DIR)/com.apple.QuickLook.thumbnailcache/thumbnails.fraghandler | |
| 86 | rm -rfv "~/Library/Application Support/Quick Look/*" | |
| 87 | chmod -R 000 "~/Library/Application Support/Quick Look" | |
| 88 | chflags -R uchg "~/Library/Application Support/Quick Look" | |
| 89 | ## Finder | |
| 90 | defaults delete ~/Library/Preferences/com.apple.finder.plist FXDesktopVolumePositions | |
| 91 | defaults delete ~/Library/Preferences/com.apple.finder.plist FXRecentFolders | |
| 92 | defaults delete ~/Library/Preferences/com.apple.finder.plist RecentMoveAndCopyDestinations | |
| 93 | defaults delete ~/Library/Preferences/com.apple.finder.plist RecentSearches | |
| 94 | defaults delete ~/Library/Preferences/com.apple.finder.plist SGTRecentFileSearches | |
| 95 | ## WiFi | |
| 96 | sudo nvram -d 36C28AB5-6566-4C50-9EBD-CBB920F83843:current-network | |
| 97 | sudo nvram -d 36C28AB5-6566-4C50-9EBD-CBB920F83843:preferred-networks | |
| 98 | sudo nvram -d 36C28AB5-6566-4C50-9EBD-CBB920F83843:preferred-count | |
| 99 | ## Typing | |
| 100 | rm -rfv "~/Library/LanguageModeling/*" "~/Library/Spelling/*" "~/Library/Suggestions/*" | |
| 101 | chmod -R 000 ~/Library/LanguageModeling ~/Library/Spelling ~/Library/Suggestions | |
| 102 | chflags -R uchg ~/Library/LanguageModeling ~/Library/Spelling ~/Library/Suggestions | |
| 103 | ## Apps | |
| 104 | rm -rfv ~/Library/Saved\ Application\ State/* | |
| 105 | rm -rfv ~/Library/Containers/<APPNAME>/Data/Library/Saved\ Application\ State | |
| 106 | chmod -R 000 ~/Library/Saved\ Application\ State/ | |
| 107 | chmod -R 000 ~/Library/Containers/<APPNAME>/Data/Library/Saved\ Application\ State | |
| 108 | chflags -R uchg ~/Library/Saved\ Application\ State/ | |
| 109 | chflags -R uchg ~/Library/Containers/<APPNAME>/Data/Library/Saved\ Application\ State | |
| 110 | ## Autosave | |
| 111 | rm -rfv "~/Library/Containers/<APP>/Data/Library/Autosave Information" | |
| 112 | rm -rfv "~/Library/Autosave Information" | |
| 113 | chmod -R 000 "~/Library/Containers/<APP>/Data/Library/Autosave Information" | |
| 114 | chmod -R 000 "~/Library/Autosave Information" | |
| 115 | chflags -R uchg "~/Library/Containers/<APP>/Data/Library/Autosave Information" | |
| 116 | chflags -R uchg "~/Library/Autosave Information" | |
| 117 | ## Siri Analytics | |
| 118 | rm -rfv ~/Library/Assistant/SiriAnalytics.db | |
| 119 | chmod -R 000 ~/Library/Assistant/SiriAnalytics.db | |
| 120 | chflags -R uchg ~/Library/Assistant/SiriAnalytics.db | |
| 121 | ## iTunes | |
| 122 | defaults delete ~/Library/Preferences/com.apple.iTunes.plist recentSearches | |
| 123 | ## QuickTime | |
| 124 | ~/Library/Containers/com.apple.QuickTimePlayerX/Data/Library/Preferences/com.apple.QuickTimePlayerX.plist | |
| 125 | ## Misc. | |
| 126 | ~/Library/Containers/com.apple.appstore/Data/Library/Preferences/com.apple.commerce.knownclients.plist | |
| 127 | ~/Library/Preferences/com.apple.commerce.plist | |
| 128 | ~/Library/Preferences/com.apple.QuickTimePlayerX.plist | |
| 129 | #+end_src | |
theme/templates/garden.html −1
| @@ -4,7 +4,6 @@ | ||
| 4 | 4 | Notes in various states of growth. Some are stubs, some are developed. |
| 5 | 5 | Browse around. |
| 6 | 6 | </p> |
| 7 | <br> | |
| 8 | 7 | <ul class="garden-index"> |
| 9 | 8 | {% for post in posts %} |
| 10 | 9 | <li> |