- Hotkeys
- System info
- Pictures
- Prevent Mac from sleeping
- Disable Gatekeeper
- Search
- Filter out error messages
- ZIP files
- Create a dummy file to occupy space
- External disk images
- Generate PPK file from RSA
- Convert OXPS to PDF
- Disable System Integrity Protection
- Change system sounds
- Unlock files in folder
- Turn the screen off
- Connect to VPN
- Wi-Fi access point
- Startup items paths
- Get disk allocation block size
- Build a C++ program
- Rebuild icons cache
- SHA checksums
- Reset privacy settings for applications
- Spotlight
- Encrypt a file with passwords for mutt
- Xcode
- Query HTTPS certificate for a domain
- Get numerical chmod value
- Split CUE
- Mac OS installer
- List pictures that have GPS data in their EXIF
- Remove quarantine attribute for not verified developer
- Custom ringtone for iOS device
- Make a DMG for an application
- Java
- Copy files based on a list from text file
- Replace text in file
- Python
- Fix Fantastical/Calendar Office 365 events updating
- Change from Zsh back to Bash
- Inspect a library
- Get file size
- Mount a remote folder via SSH
- Get logs of a failing VPN
- ⌘ - command
- ⌥ - option
- ⌃ - control
- ⇧ - shift
Zoom parts of the screen:
- gradually zoom in:
- ⌘ ⌥ +
- gradually zoom out:
- ⌘ ⌥ -
- instantly zooms in to the last used scale or reset the zoom to default 100%:
- ⌘ ⌥ 8
Minimize all windows:
- ⌘ ⌥ H M
Lock:
- ⌘ ⌃ Q
$ sw_vers -productVersion
or
$ system_profiler SPSoftwareDataType
$ date '+%d.%m.%Y %H:%M:%S UTC%z'
09.03.2017 12:56:33 UTC+0100
$ sysctl -n machdep.cpu.brand_string
$ system_profiler SPHardwareDataType | grep Cores:
$ system_profiler SPHardwareDataType | grep Processors:
$ system_profiler SPHardwareDataType | grep Memory:
$ system_profiler SPDisplaysDataType
$ ifconfig | grep "inet" | grep -Fv 127.0.0.1 | grep -Fv ::1 | awk '{print $2}'
or without IPv6 addresses (add space after inet
and remove ::1
filter):
$ ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}'
or just:
$ ipconfig getifaddr en0
en0
- your network interface
$ curl ipecho.net/plain; echo
$ sips --resampleWidth 800 some.jpg
But better install ImageMagick and resize with it, as it preserves better quality:
$ magick convert some.jpg -resize 800 some-800.jpg
Except color profile, of course:
$ exiftool -all= --icc_profile:all ./some.jpg
caffeinate -u -t 600
-u
- emulates "user" usage-t 600
- 600 seconds (10 minutes)
To allow installing applications from any source.
Check the status:
spctl --status
assessments enabled
- feature is turned on (you cannot install apps from any source)assessments disabled
- feature is turned off (you can install from anywhere)
Turn off the feature:
sudo spctl --master-disable
Turn on the feature back:
sudo spctl --master-enable
And the biggest directories too, of course.
$ du -hs ./* | sort -rn | head -10
du
- utility that displays the file system block usage-s
- show only top-level folders (without showing subfolders)-h
- present folders size in a human-readable format~/*
- count everything from the home directory
sort
- utility for sorting results-r
- reverse the list (because by default it goes ascending)-n
- sort by numeric values (size, in our case)
head
- shows only specified number of lines from result
However, this sort
sorts only numbers without respecting the data unit (MB, GB, etc):
$ du -hs ./* | sort -rn | head -10
880M /Users/username/Applications
879M /Users/username/temp
56G /Users/username/Library
34M /Users/username/Desktop
23G /Users/username/Pictures
11G /Users/username/Music
9.2G /Users/username/Documents
$ du -hs ./* | gsort -rh | head -10
56G /Users/username/Library
23G /Users/username/Pictures
11G /Users/username/Music
9.2G /Users/username/Documents
6.3G /Users/username/Movies
2.3G /Users/username/Downloads
880M /Users/username/Applications
879M /Users/username/temp
So, it is all the same, but instead of sort
we are using gsort
, which supports h
option (that respects human-readable data units). If you don't have gsort
in your system, it can be installed via brew install coreutils
.
Let's find all the files (and folders) in your home folder that are related to the GarageBand application:
$ find ~ -iname "*garage*"
Two *
wildcards will help to find any file (and folder) that contains garage
in any part of its name.
You can also look for all .mp4
files in your home directory:
$ find ~ -iname "*.mp4"
And here's a more complex example: look for all .mp4
files in your home directory, then sort results by the file size and show only top 10 biggest ones:
$ find ~ -iname "*.mp4" -print0 | xargs -0 du -sh | gsort -rh | head -10
find
- utility for searching-iname
- look in file names, ignoring case and using*
wildcard to specify the.mp4
extension-print0
- adds a NULL character (instead of newline) after the name of each found file. This is needed for long file names with spaces and stuff
xargs
- takes result strings from the previous command and uses them as arguments for the next command in pipe (fordu
in our case)-0
- tells xargs to expect NULL characters as separators instead of spaces (that aligns with our-print0
fromfind
)
gsort
- read about it here
Search in files of parent directory only (without going into subfolders):
$ grep -ils "sOmE tEXt" *.txt
grep
- utility for searching text-i
- ignoring case-l
- output only file names-s
- don't show warnings likeIs a directory
*.txt
- file name pattern, but works only with a single directory level (doesn't apply to subfolders)
Search in subfolders too:
$ grep -ilrn "sOmE tEXt" *
-r
- search recursively (in subfolders). Now there is no need in option-s
(I guess)-n
- add line numbers
Search in particular files only:
$ grep -ilr "sOmE tEXt" --include=*.{txt,mark*} *
--include=
- proper file name pattern that applies to all folder levels. This particular one will process only.txt
and.markdown
(all.mark*
ones, to be precise) files
Another (clearer) way:
$ grep --include=\*.{cpp,h} -irn "/some/path/" -e "sOmE tEXt"
Say you want to exclude error messages from some output.
If you want to exclude all the errors:
find / -iname "*.mp4" 2>/dev/null
If you want to exclude only specific errors:
find / -iname "*.mp4" 2>&1 | grep -v "Operation not permitted" | grep -v "Permission denied"
$ zip -r9T archiveName.zip folderToArchive -x "*.DS_Store"
-r
- recursive, including all subfolders-9
- compression level: from0
(no compression) to9
(maximum compression)-T
- test archive integrity after finishing
To unpack the archive into current folder:
$ unzip archiveName.zip
With less
:
$ brew install lesspipe
$ nano ~/.bash_profile
export LESSOPEN="|/usr/local/bin/lesspipe.sh %s" LESS_ADVANCED_PREPROCESSOR=1
$ source ~/.bash_profile
$ less archiveName.zip
With unzip
:
$ unzip -l archiveName.zip
$ dd if=/dev/random of=/tmp/stupidfile.crap bs=20m
This will start to create a file, "growing" it with 20 MB chunks of random trash. The process will never stop, so you'll need to break it with ⌃ + C
.
If you want to monitor the file's size in Terminal, install and run watch
utility:
$ brew install watch
$ watch ls -alh /tmp/stupidfile.crap
That actually works with external USB flash drives too, and of course not only .img
but .iso
as well.
$ diskutil list
$ sudo dd if=/dev/rYOUR-CARD of=/path/to/image.img bs=1m
$ diskutil list
$ diskutil unmountDisk /dev/YOUR-CARD
$ sudo dd if=/path/to/image.img of=/dev/rYOUR-CARD bs=1m
r
- raw, makes the writing faster
You can watch the progress by pressing ⌃ + T
combination.
After it's finished, eject the drive:
$ diskutil eject /dev/YOUR-CARD
Available file systems:
$ diskutil listFilesystems
$ diskutil list
$ sudo diskutil eraseDisk FAT32 CARD-LABEL MBRFormat /dev/YOUR-CARD
Mac OS Extended (Case-sensitive, Journaled):
$ sudo diskutil eraseDisk jhfsx MAC /dev/YOUR-CARD
Source and additional information: http://gree2.github.io/mac/command/2015/06/27/mac-diskutil-command
So you have your RSA key to connect to some server via SFTP. But suddenly you need to connect to this server from Windows using FileZilla, and it accepts only PPK files.
brew install putty
puttygen ~/.ssh/id_rsa_server -o server.ppk
$ brew install ghostscript
$ /usr/local/Cellar/ghostscript/9.26/bin/gxps -sDEVICE=pdfwrite -sOutputFile=~/Desktop/output.pdf -dNOPAUSE some-file.oxps
- Reboot the Mac and hold down
Command + R
after you hear the startup chime, this will boot macOS into Recovery Mode; - Click the Utilities menu at the top of the screen instead and choose Terminal;
csrutil disable
;- Reboot the Mac.
- Disable System Integrity Protection;
- Choose the sound file you want to change (
/System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds/dock/drag to trash.aif
); - Replace it with a sound of your choice;
- Enable System Integrity Protection back.
chflags -R nouchg /path/to/some/folder
-R
- recursive;nouchg
- removes immutable flag.
pmset displaysleepnow
sudo openconnect https://vpn.your.domain/full --user=vasya
sudo networksetup -createnetworkservice Loopback lo0
sudo networksetup -setmanual Loopback 172.20.42.42 255.255.255.255
And then enable Internet Sharing for Loopback interface in the Sharing settings.
/Library/StartupItems
/Library/LaunchDaemons
/Library/LaunchAgents
/System/Library/LaunchAgents
/System/Library/LaunchDaemons
And how to disable daemons:
sudo launchctl unload /Library/LaunchDaemons/com.some.helper.plist
sudo rm /Library/LaunchDaemons/com.some.helper.plist
$ diskutil list
/dev/disk0 (internal):
...
/dev/disk1 (synthesized):
...
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *2.0 TB disk2
1: Windows_NTFS Samsung_T5 2.0 TB disk2s1
$ diskutil info disk2s1
Device Identifier: disk2s1
Device Node: /dev/disk2s1
...
Volume Name: Samsung_T5
Mounted: Yes
Mount Point: /Volumes/Samsung_T5
Partition Type: Windows_NTFS
File System Personality: ExFAT
Type (Bundle): exfat
Name (User Visible): ExFAT
Disk Size: 2.0 TB (2000396321280 Bytes) (exactly 3907024065 512-Byte-Units)
Device Block Size: 512 Bytes
...
Allocation Block Size: 131072 Bytes
Device Block Size
- physical block size (sector);Allocation Block Size
- logical block size: 131072 bytes is 128 KB per block (131072 B / 1024 = 128 KB), so one such block takes 256 sectors on this disk (1 sector is 512 bytes).
$ nano some.cpp
#include <iostream>
int main(int argc, char *argv[])
{
std::cout << "ololo\n";
return 0;
}
$ clang++ some.cpp -o some
$ ./some
If you need C++11 standard, then:
clang++ -std=c++11 some.cpp -o some
From Clearing the Icon Services Cache in Mojave.
As administrator:
sudo rm -rfv /Library/Caches/com.apple.iconservices.store
sudo find /private/var/folders/ \( -name com.apple.dock.iconcache -or -name com.apple.iconservices \) -exec rm -rfv {} \;
Then as your normal user:
killall Dock
By default it calculates SHA1:
$ shasum ./clonezilla-live-20191024-eoan-amd64.iso > clonezilla-live-20191024-eoan-amd64.iso.sha1
You can specify SHA256 (or any other):
$ shasum -a 256 ./clonezilla-live-20191024-eoan-amd64.iso > clonezilla-live-20191024-eoan-amd64.iso.sha256
To verify checksum:
$ shasum -c ./clonezilla-live-20191024-eoan-amd64.iso.sha256
$ tccutil reset AppleEvents
$ tccutil reset SystemPolicyAllFiles
Helped me when accountsd
was consuming more than 200% CPU and Mail was barely usable.
$ cd /
$ sudo mdutil -E /
$ sudo mdutil -a -i off
$ sudo rm -fr .Spotlight-V100/
$ sudo mdutil -i on /Volumes/Macintosh\ HD
$ sudo fs_usage -w -f filesys mds_stores
If rebuilding index doesn't really help, and mds
and mds_stores
continue to eat up CPU and do something like crazy even when you don't do anything, disable it for good, fuck that thing:
$ sudo mdutil -a -i off
To turn it back on:
$ sudo mdutil -a -i on
Go to temp folder:
$ cd /tmp
$ nano pwds
Enter some passwords:
set my_pwd_ololo = nfSas3SF#f54snCs
set my_pwd_some = cm!jj1i495sfdsgs
Encrypt them with PGP and move encrypted file somewhere:
$ gpg --recipient YOUR-EMAIL-FROM-GPG-KEYCHAIN --encrypt pwds
$ rm pwds
$ mv pwds.gpg ~/.mutt
Now you can read decrypt and read those passwords and refer to them in your configs like this:
source "gpg -dq ~/.mutt/pwds.gpg |"
set imap_pass = $my_pwd_ololo
Your PGP tool will be asking you for master password, so save it in the system keychain.
$ xcodebuild -showsdks
DriverKit SDKs:
DriverKit 21.2 -sdk driverkit21.2
iOS SDKs:
iOS 15.2 -sdk iphoneos15.2
iOS Simulator SDKs:
Simulator - iOS 15.2 -sdk iphonesimulator15.2
macOS SDKs:
macOS 12.1 -sdk macosx12.1
tvOS SDKs:
tvOS 15.2 -sdk appletvos15.2
tvOS Simulator SDKs:
Simulator - tvOS 15.2 -sdk appletvsimulator15.2
watchOS SDKs:
watchOS 8.3 -sdk watchos8.3
watchOS Simulator SDKs:
Simulator - watchOS 8.3 -sdk watchsimulator8.3
$ xcrun simctl io --help
If you get
xcrun: error: unable to find utility "simctl", not a developer tool or in PATH
enable Command Line Tools
in Xcode
➞ Preferences
➞ Locations
.
To record a video start the Simulator
and:
$ xcrun simctl io booted recordVideo --codec=h264 capture.mp4
$ sqlite3 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/usr/standalone/device_traits.db
> select * from Devices where ProductDescription like 'iPad Pro (11-inch%';
j517ap|j517|ap|t8103|iPad13,4|iPad Pro (11-inch) (3rd generation)|iPad8,2||11
j517xap|j517x|ap|t8103|iPad13,5|iPad Pro (11-inch) (3rd generation)|iPad8,2||9
j518ap|j518|ap|t8103|iPad13,6|iPad Pro (11-inch) (3rd generation)|iPad8,4||11
j518xap|j518x|ap|t8103|iPad13,7|iPad Pro (11-inch) (3rd generation)|iPad8,4||9
j317ap|j317|ap|t8027|iPad8,1|iPad Pro (11-inch)|iPad7,3||21
j418ap|j418|ap|t8027|iPad8,10|iPad Pro (11-inch) (2nd generation)|iPad8,3||2
j317xap|j317x|ap|t8027|iPad8,2|iPad Pro (11-inch)|iPad7,3||2
j318ap|j318|ap|t8027|iPad8,3|iPad Pro (11-inch)|iPad7,4||21
j318xap|j318x|ap|t8027|iPad8,4|iPad Pro (11-inch)|iPad7,4||2
j417ap|j417|ap|t8027|iPad8,9|iPad Pro (11-inch) (2nd generation)|iPad8,1||2
$ openssl s_client -showcerts -connect protvshows.com:443
$ stat -f "%OLp" ~/.ssh/github
600
Most of the times XLD is the tool. If it cannot open some .cue
, then perhaps this file is in some weird encoding (such as Windows 1251
) or you don't have a required decoder installed (such as wavpack
).
If, still, you'd prefer using CLI tools, then shntool is one:
$ brew info shntool
$ brew install wavpack
And then:
$ shnsplit -f some.wv.cue -o flac -t '%n - %p - %t' some.wv
here:
-f some.wv.cue
path to.cue
file-o
output format-t
tracks name format (03 - Linkin Park - Somewhere I Belong)some.wv
- path to the file to split
List available downloads (or, actually, updates, which are applicable for the currently installed version):
$ softwareupdate --list
$ softwareupdate --fetch-full-installer --full-installer-version 14.4
10.13.6
- High Sierra10.14.6
- Mojave10.15.7
- Catalina11.3
- Big Sur- ?
13.6.5
- Ventura14.4
- Sonoma
If some of those give an error like Install failed with error: Update not found
, try to change/add the third number in the version value.
To verify the downloaded installer:
$ pkgutil --check-signature ~/Desktop/Install\ macOS\ Sonoma.app
Package "Install macOS Sonoma.app":
Status: signed by a certificate trusted by macOS
Certificate Chain:
1. Software Signing
Expires: 2026-10-24 17:39:41 +0000
SHA256 Fingerprint:
D8 4D B9 6A F8 C2 E6 0A C4 C8 51 A2 1E C4 60 F6 F8 4E 02 35 BE B1
7D 24 A7 87 12 B9 B0 21 ED 57
------------------------------------------------------------------------
2. Apple Code Signing Certification Authority
Expires: 2026-10-24 17:39:41 +0000
SHA256 Fingerprint:
5B DA B1 28 8F C1 68 92 FE F5 0C 65 8D B5 4F 1E 2E 19 CF 8F 71 CC
55 F7 7D E2 B9 5E 05 1E 25 62
------------------------------------------------------------------------
3. Apple Root CA
Expires: 2035-02-09 21:40:36 +0000
SHA256 Fingerprint:
B0 B1 73 0E CB C7 FF 45 05 14 2C 49 F1 29 5E 6E DA 6B CA ED 7E 2C
68 C5 BE 91 B5 A1 10 01 F0 24
$ codesign -dvv ~/Desktop/Install\ macOS\ Sonoma.app
Executable=/Users/vasya/Desktop/Install macOS Sonoma.app/Contents/MacOS/InstallAssistant_springboard
Identifier=com.apple.InstallAssistant.macOSSonoma
Format=app bundle with Mach-O universal (x86_64 arm64)
CodeDirectory v=20400 size=639 flags=0x2000(library-validation) hashes=13+3 location=embedded
Platform identifier=15
Signature size=4523
Authority=Software Signing
Authority=Apple Code Signing Certification Authority
Authority=Apple Root CA
Signed Time=23 Feb 2024 at 05:15:14
Info.plist entries=32
TeamIdentifier=not set
Sealed Resources version=2 rules=2 files=0
Internal requirements count=1 size=88
$ hdiutil create -o /tmp/MacBigSur -size 13100m -volname MacBigSur -layout SPUD -fs HFS+J
$ hdiutil attach /tmp/MacBigSur.dmg -noverify -mountpoint /Volumes/MacBigSur
$ sudo /path/to/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/MacBigSur --nointeraction
If you get an error like:
Erasing disk: 0%... 10%...
Error erasing disk error number (22, 0)
An error occurred erasing the disk.
Then make sure that /tmp
(or whichever) is not opened in any Terminal tab (including your current one) and also that it is not opened in any Finder window/tab. If that still doesn't help, then reboot the computer (and you will likely need to recreate the image, as /tmp
folder is usually cleared on reboot).
The successful output should look like this:
Erasing disk: 0%... 10%... 20%... 30%... 100%
Copying to disk: 0%... 10%... 20%... 30%... 40%... 50%... 60%... 70%... 80%... 90%... 100%
Making disk bootable...
Install media now available at "/Volumes/Install macOS Big Sur"
Then after detaching/unmounting the image, if it was not already (might even need to Force Eject):
$ hdiutil convert /tmp/MacBigSur.dmg -format UDTO -o /tmp/MacBigSur.cdr
$ mv /tmp/MacBigSur.cdr /tmp/MacBigSur.iso
$ brew install exiftool
$ exiftool -if '$gpslatitude' -ext jpg -filename -gpslatitude -gpslongitude -T /path/to/folder/with/images > images-with-gps.txt
If you want the other way around, so get the images without GPS data, then -if 'not $gpslatitude'
.
Check if there is quarantine attribute set:
$ xattr ~/Applications/Some.app
com.apple.quarantine
Remove the attribute(s):
$ xattr -cr ~/Applications/Some.app
If you have some .dylib
libraries, but Mac OS refuses to load them, saying that developer cannot be verified, for example when you downloaded FFmpeg libraries for Audacity.
Check the attribute values:
$ xattr -p com.apple.quarantine ffmpeg*.dylib
ffmpeg.55.64bit.dylib: 0083;61211dae;Keka;77B2039D-233L-4BB7-A515-5C8LM8E62352
ffmpeg_codecs.55.64bit.dylib: 0083;61211dae;Keka;77B2039D-233L-4BB7-A515-5C8LM8E62352
ffmpeg_utils.52.64bit.dylib: 0083;61211dae;Keka;77B2039D-233L-4BB7-A515-5C8LM8E62352
Replace 0083
with 00c1
:
$ xattr -w com.apple.quarantine "00c1;61211dae;Keka;77B2039D-233L-4BB7-A515-5C8LM8E62352" ffmpeg*.dylib
- Cut the fragment of the song you want (Audacity is a nice tool for that). It should be less than 30 seconds
- Convert it to M4A, for example with FFmpeg, or export it directly to M4A from your audio editor
- Rename
your-file.m4a
toyour-file.m4r
The procedure for transferring it to your iOS device is constantly changing, thanks to Apple. On Mac OS 11.5.2 the following works:
- Delete all the metadata from your file:
$ exiftool -all:all= ./your-file.m4r
- Just in case, there should not be spaces of weird symbols in the file name
- Connect your iOS device to your Mac, open Finder, open discovered device
- Drag your file anywhere in the General tab
Oh, and by the way, Apple, fuck you!
$ hdiutil create -volname SomeName -srcfolder /path/to/some.app -ov -format UDZO some.dmg
Note that a simple 7z archive of the same application will have a much better compression, and essentially it doesn't matter if your application is distributed as a DMG of as a 7z archive, so the latter is a better choice.
If you get an error about missing Java, when trying to launch some application:
This application requires that Java 8 or later be installed on your computer. Please download and install the latest version of Java from www.java.com and try again.
Then you need to install JRE. The process was never easy, and I couldn't find a way that would make all the applications happy, but what does work is to download JRE from here, install the .pkg
and run the application via -jar
:
$ /usr/libexec/java_home
$ java -jar ~/Applications/TOPCAT.app/Contents/Java/topcat-full.jar
If trying to run an application you get:
The JVM shared library "/Library/Java/JavaVirtualMachines/temurin-17.jre/Contents/Home/bin/../lib/server/libjvm.dylib" does not contain the JNI_CreateJavaVM symbol
or similar, then it could be that you have an ARM-based Mac and you installed an aarch64-based JRE, but that application is for Intel x64. In that case you just need to install an x64-based JRE. Be aware that it will be installed instead of the previously installed aarch64-based one, which probably means that you'll be able to run either x64 applications or ARM ones (having installed that JRE instead).
If you don't want to preserve folder structure, remove -R
option:
$ rsync -R $(<list.txt) /path/to/destination/folder || :
And the || :
on the end will make it succeed even if there are missing files.
Since sed
on Mac OS is kind of handicapped, you need to do this -i ""
and also you can't use \w
:
# /Users/build/buildAgent/work/some_git_master/install/macOS_x64/include/things/Compositing/CompositeManager.h
$ sed -i "" -E 's/.*install\/[a-zA-Z0-9_]+\///g' ./install-manifest-release.txt
# include/things/Compositing/CompositeManager.h
Note that -E
is capital.
So, as usual, you did that:
$ sudo ln -s /usr/bin/python3 /usr/local/bin/python
$ which python
/usr/local/bin/python
But now trying to execute it fails with the following:
$ python --version
python: error: Failed to locate 'python'.
xcode-select: Failed to locate 'python', requesting installation of command line developer tools.
Check where it tries to find it:
$ xcode-select -p
/Applications/Xcode.app/Contents/Developer
$ ls -l /Applications/Xcode.app/Contents/Developer/usr/bin
So yeah, for some fucking reason it tries to find python
there, and it's not there, so add it there too:
$ sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/bin/python3 /Applications/Xcode.app/Contents/Developer/usr/bin/python
$ python --version
If it is still pointing to Python 2, then probably your PATH
contains some more locations that come before /usr/local/bin
.
Piece of shit of administrators in your company might disable using 3rd-party clients for your Office 365 account, so you won't be able to use Fantastical for your Office 365 calendars. There is a workaround/fallback hidden Fantastical setting: open the following URL - x-fantastical3://defaults?key=EventKitSyncExchange&value=1&type=bool&group=1
- in web-browser and allow Fantastical to handle the action.
Here's also a comment from Fantastical's support about this setting:
Please note it will it will be buggier and slower than it is on iOS because of how EventKit works on the Mac. Also, there are some limitations when using this option (invitees don't work, can't hide events, set custom colors, etc), but you'll be able to see the events.
But then at some point (unrelated to this setting) you might experience that Calendar and consequently Fantastical would stop getting updates about existing events and any new events in that particular calendar or maybe even all the calendars. The solution (until the next time it happens) seems to be to kill the CalendarAgent
, forcing it to restart and re-sync:
$ killall -9 CalendarAgent
I think this happens when Office 365 authentication cookie/session expires in that internet account so you need to authenticate again (and then you also need to kill/reload the CalendarAgent
).
Under every user account (if you have more than one)
$ chsh -s /bin/bash
and restart the terminal/session.
$ nm --demangle ./vcpkg_installed/arm64-ios/lib/libz.a
adler32.c.o:
0000000000000330 T _adler32
0000000000000338 T _adler32_combine
00000000000003fc T _adler32_combine64
0000000000000000 T _adler32_z
0000000000000000 t ltmp0
00000000000004c0 s ltmp1
...
$ otool -hv ./vcpkg_installed/arm64-ios/lib/libz.a
Archive : ./vcpkg_installed/arm64-ios/lib/libz.a
./vcpkg_installed/arm64-ios/lib/libz.a(adler32.c.o):
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
MH_MAGIC_64 ARM64 ALL 0x00 OBJECT 4 360 SUBSECTIONS_VIA_SYMBOLS
...
$ lipo -info ./vcpkg_installed/arm64-ios/lib/libz.a
Non-fat file: ./vcpkg_installed/arm64-ios/lib/libz.a is architecture: arm64
The usual:
$ du -hs ./libproj.a
5.9M
There is also an option for (rounded) kilobytes:
$ du -k ./libproj.a
6028
But since du
on Mac OS cannot output the size in bytes, one has to use stat
:
$ stat -f "%z bytes" ./libproj.a
6172152 bytes
Install macFUSE (both macFUSE and SSHFS). It will require rebooting to Recovery in order to enable kernel extensions.
After it is installed:
$ mkdir ~/Downloads/_mounted
$ sshfs SOME-HOST:/home/YOUR-USERNAME ~/Downloads/_mounted -ovolname=_mounted
The SOME-HOST
here is an entry from your ~/.ssh/config
.
To unmount:
$ umount -f ~/Downloads/_mounted
If you fail to connect to some VPN server, the logs with failure details for the last 1 hour can be obtained in the following manner (you might need to su
into administrator user):
$ sudo log show --last 1h --predicate 'eventMessage CONTAINS[cd] "vpn"' > /tmp/vpn.log
or, if you know the exact term/service/whatever:
$ sudo log show --last 1h --predicate 'eventMessage CONTAINS[cd] "NESMIKEv2VPNSession"' > /tmp/vpn.log
For instance, that's how I discovered that my client certificate has expired:
...
nesessionmanager: [com.apple.networkextension:] NESMIKEv2VPNSession[Primary Tunnel:MY-VPN-NAME:SOME-ID-HERE:(null)] in state NESMVPNSessionStateStarting: plugin NEVPNTunnelPlugin(com.apple.NetworkExtension.IKEv2Provider[inactive]) did detach from IPC
nesessionmanager: [com.apple.networkextension:] NESMIKEv2VPNSession[Primary Tunnel:MY-VPN-NAME:SOME-ID-HERE:(null)]: didSetStatus - 0
nesessionmanager: [com.apple.networkextension:] NESMIKEv2VPNSession[Primary Tunnel:MY-VPN-NAME:SOME-ID-HERE:(null)] in state NESMVPNSessionStateStarting: plugin NEVPNTunnelPlugin(com.apple.NetworkExtension.IKEv2Provider[inactive]) disconnected with reason Client certificate has expired
nesessionmanager: [com.apple.networkextension:] NESMIKEv2VPNSession[Primary Tunnel:MY-VPN-NAME:SOME-ID-HERE:(null)]: Leaving state NESMVPNSessionStateStarting
nesessionmanager: [com.apple.networkextension:] NESMIKEv2VPNSession[Primary Tunnel:MY-VPN-NAME:SOME-ID-HERE:(null)]: Entering state NESMVPNSessionStateStopping, timeout 20 seconds
...