Skip to content

Instantly share code, notes, and snippets.

View donato-fiore's full-sized avatar

Donato Fiore donato-fiore

View GitHub Profile
@donato-fiore
donato-fiore / Root.plist
Last active April 4, 2025 20:27
Visually load and unload specific `PSSpecifier`'s based on a different `PSSpecifier`'s value
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>cell</key>
<key>PSSwitchCell</key>
<key>default</key>
@donato-fiore
donato-fiore / Tweak.x
Last active April 6, 2025 00:39
Allow ControlCenter modules to load when running in a simulator.
#import <Foundation/Foundation.h>
@interface NSObject (Private)
- (id)safeValueForKey:(NSString *)key;
@end
@interface NSArray (BaseBoard)
- (id)bs_mapNoNulls:(id (^)(id))arg1;
- (id)bs_flatten;
- (id)bs_filter:(BOOL (^)(id))arg1;
@donato-fiore
donato-fiore / PSListController+JSON.h
Last active May 12, 2025 23:11
PSListController extension to load JSON files.
#include <Preferences/PSListController.h>
@interface PSListController (JSON)
- (NSMutableArray *)loadSpecifiersFromJSONName:(NSString *)name target:(PSListController *)target;
- (NSMutableArray *)loadSpecifiersFromJSONName:(NSString *)name target:(PSListController *)target bundle:(NSBundle *)bundle;
@end