Skip to content

Instantly share code, notes, and snippets.

@tempelmann
tempelmann / README.md
Created August 4, 2026 14:21
Fetch Alassian hosted inline images for exported Bitbucket Issues

Fetch Atlassian-hosted images and other inline data from exported Bitbucket Issues.

Background / purpose

When exporting Issues from Bitbucket (which has to be done before they close it on Aug 20, 2026), the export will include attachments but will keep referencing inline images on their servers instead of downloading them.

Which means: The issues still reference images on Atlassian's servers, and there's no guarantee they won't disappear there eventually, too.

Therefore, it's prudent to download those images as well.

@tempelmann
tempelmann / main.m
Created March 29, 2026 20:13
UTI conforms to
//
// main.m
// uti-conforms-to
//
// Created by Thomas Tempelmann on 29.03.26.
//
#import <Foundation/Foundation.h>
#include <libgen.h>
@tempelmann
tempelmann / paddle-wh-verify.php
Created March 10, 2024 14:06
Paddle.com webhook verification (PHP)
// 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
@tempelmann
tempelmann / NSStringFolded.h
Last active February 1, 2024 17:31
Case or diacritics insensitive NSString subclass for convenient use in NSDictionary, NSSet etc. as KeyType
//
// 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)
//
@tempelmann
tempelmann / gist:4e7d7290ef76fdb0aa790e5f9b9450c6
Created May 3, 2023 18:29
Crashlog of FAF 2.4 regarding _CFPrefsDeliverPendingKVONotifications
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
@tempelmann
tempelmann / crashlog.txt
Created September 2, 2021 15:12
Crashlog of Find Any File 2.x; occurs for some users at first launch only. I cannot reproduce it and look for others who know this type of crash
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:
@tempelmann
tempelmann / ContentView.swift
Created July 22, 2021 13:04
Lists every `NSImage(named:…)` system provided image / icon
//
// ContentView.swift
//
// Lists all system-provided NSImages
//
// Created by Thomas Tempelmann on 20.07.21.
//
// Requires Swift 5
//
@tempelmann
tempelmann / hasFullDiskAccess.m
Created July 20, 2021 14:15
Code used in Find Any File to test whether Full Disk Access is enabled
+ (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
@tempelmann
tempelmann / FAFv2_crash2.txt
Created June 1, 2021 13:21
Crash report in [NSPathControl mouseDown:] around `setHighlighted:`, 2 of 2
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
@tempelmann
tempelmann / FAFv2_crash.txt
Created June 1, 2021 13:20
Crash report in [NSPathControl mouseDown:] around `setHighlighted:`, 1 of 2
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