-
-
AI development tools are giving us more ability to steer them and share the context that's in our heads. Some things are my global desires, while others apply project-wide or org-wide. This has all given birth to a plethora of "rules" files that we need to manage.
This file contains hidden or 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
#import <Foundation/Foundation.h> | |
#import "ffi.h" | |
NSMutableArray *g_allocations; | |
ffi_cif g_cif; | |
ffi_closure *g_closure; | |
void *g_replacement_invoke; | |
void *g_origin_invoke; |
This file contains hidden or 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
#import <Foundation/Foundation.h> | |
typedef struct __block_impl { | |
void *isa; | |
int Flags; | |
int Reserved; | |
void *FuncPtr; | |
}__block_impl; | |
typedef void(^GlobalBlock)(void); |
This file contains hidden or 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
START_DATE=$(date +"%s") | |
SWIFT_LINT=/usr/local/bin/swiftlint | |
# Run SwiftLint for given filename | |
run_swiftlint() { | |
local filename="${1}" | |
if [[ "${filename##*.}" == "swift" ]]; then | |
${SWIFT_LINT} lint --path "${filename}" | |
fi |
This file contains hidden or 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
# The trick is to link the DeviceSupport folder from the beta to the stable version. | |
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
# (A similar approach works for older versions too, just change the version number after DeviceSupport) |
This file contains hidden or 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
PSPDF_EXTERN BOOL PSPDFIsBlock(id _Nullable block) { | |
static Class blockClass; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
blockClass = [^{} class]; | |
while ([blockClass superclass] != NSObject.class) { | |
blockClass = [blockClass superclass]; | |
} | |
}); |