Skip to content

Instantly share code, notes, and snippets.

@varahash
varahash / gist:9fc02e5b88c3259796e7b740b1963202
Created November 15, 2020 15:08
Repair APFS 'warning: overallocation detected on Main device'
1. Boot into Recovery mode (by pressing CMD+R while boot macOS)
2. Unmount APFS volumes automaticaly mounted by Recovery (where /dev/disk2 is your APFS container)
$ diskutil unmountDisk /dev/disk2
Unmount of all volumes on disk2 was successful
3. Unlock APFS volumes (in case FileVault enabled for this volume)
$ diskutil apfs unlockVolume /dev/disk2s1 -nomount
@Aneureka
Aneureka / sync-from-chrome-to-safari
Last active January 25, 2025 03:24
An apple script to sync history, bookmarks & passwords from google chrome to safari.
# Add a scheduled sync task at 4:00 am
# Some privileges should be granted to `cron` *manually*, so you may test `* * * * *` (run every second) first to grant the needed privileges in advance
0 4 * * * osascript /path/to/your/sync-from-chrome-to-safari.scpt