This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://developer.paddle.com/webhooks/signature-verification shows code using a `Verifier` class | |
// to check that the message from Paddle is authentic. | |
// Sadly, it doesn't explain where the value for the `$request` variable comes from. It seems you need to use | |
// the PSR framework for that, but I was unable to find a way to use it for getting the data for the POST | |
// I am handling in my webhook handler. | |
// Fortunately, I was able to resolve this by looking into the code of the Verifier class from the SDK. | |
// Here's a version that does not rely on PSR. You still haveo to install Paddle's PHP SDK, though, | |
// see https://github.com/PaddleHQ/paddle-php-sdk/ | |
require_once 'vendor/autoload.php'; // the path to your vendor dir created with "composer" tool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSStringFolded.h | |
// | |
// Created by Thomas Tempelmann on 31 Jan 2024. | |
// Author retains no copyright - given to public domain | |
// | |
// Purpose: Provide a way to have case insensitive keys in an NSDictionary | |
// (see https://stackoverflow.com/a/77914964/43615) | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread | |
0 libobjc.A.dylib 0x00007fff58d3ac3e object_isClass + 31 | |
1 com.apple.Foundation 0x00007fff33c555c1 KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED + 58 | |
2 com.apple.Foundation 0x00007fff33c55372 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:usingBlock:] + 341 | |
3 com.apple.Foundation 0x00007fff33c54f24 -[NSObject(NSKeyValueObservingPrivate) _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:] + 699 | |
4 com.apple.CoreFoundation 0x00007fff31af5ebb -[CFPrefsSource forEachObserver:] + 347 | |
5 com.apple.CoreFoundation 0x00007fff31af66e0 -[CFPrefsSource _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:] + 80 | |
6 com.apple.CoreFoundation 0x00007fff31b39f52 __93-[CFPrefsSearchListSource deferredNotifyCausedByLoadingOfChangesFromDictionary:toDictionary:]_block_invoke + 34 | |
7 com.apple.CoreF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Exception Type: EXC_CRASH (SIGABRT) | |
Exception Codes: 0x0000000000000000, 0x0000000000000000 | |
Exception Note: EXC_CORPSE_NOTIFY | |
Application Specific Information: | |
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSDictionaryM setObject:forKey:]: object cannot be nil (key: Result Window Controller)' | |
abort() called | |
terminating with uncaught exception of type NSException | |
Application Specific Backtrace 1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ContentView.swift | |
// | |
// Lists all system-provided NSImages | |
// | |
// Created by Thomas Tempelmann on 20.07.21. | |
// | |
// Requires Swift 5 | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (BOOL)hasFullDiskAccess | |
{ | |
if (@available(macOS 10.14, *)) { | |
// fall thru | |
} else { | |
return YES; // always true pre-10.14 | |
} | |
// | |
// The following code was kindly provided by Pierre Bernard, author of AccessKit, Tembo and HoudahSpot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Code Type: ARM-64 (Native) | |
OS Version: macOS 11.4 (20F71) | |
System Integrity Protection: enabled | |
Crashed Thread: 0 Dispatch queue: com.apple.main-thread | |
Exception Type: EXC_BAD_ACCESS (SIGSEGV) | |
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000119ad698 | |
Exception Note: EXC_CORPSE_NOTIFY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Code Type: X86-64 (Native) | |
OS Version: macOS 11.3 (20E232) | |
System Integrity Protection: enabled | |
Crashed Thread: 0 Dispatch queue: com.apple.main-thread | |
Exception Type: EXC_BAD_ACCESS (SIGSEGV) | |
Exception Codes: KERN_INVALID_ADDRESS at 0x000007fa5e5667b8 | |
Exception Note: EXC_CORPSE_NOTIFY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This script uses Acorn (tested with version 6.6.4) | |
-- to add a light border around a window screenshot. | |
-- | |
-- Screenshots (without the huge macOS shadows) are made by shift-cmd-4, then space bar, | |
-- then option-click on window (see https://apple.stackexchange.com/a/120017/17533) | |
-- | |
-- Before use, you need to create a Preset Filter for this, once: | |
-- With an image opened, use from menu: Filter / Stylize / Drop Shadow… | |
-- Set its options as you prefer (e.g. X/Y offset 0, Blur Radius 2, Opacity 80%), | |
-- then save it by clicking the gear icon, choose "Save Filter Preset…" and |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Created by Thomas Tempelmann on 6 Apr 21, updated 8 Apr 21. | |
// | |
// This code demonstrates a unicode normalization issue with reading file system paths on APFS | |
// volumes in macOS. | |
// | |
// TL;DR – In short, NSURL.path return paths (probably) always in NFD form even if the on-disk | |
// name is in NFC form, and even if you passed the on-disk path to NSURL to create it. | |
// Other path accessors, such as the canonical path, as well as BSD/POSIX functions | |
// will keep giving you the on-disk name. | |
// As a result, the name you get from NSURLNameKey may not be identical to the URL's |
NewerOlder