routes
– an array of route objectsrequest
- configuration of a request.response
- configuration of the response.resourcePath
- relative path of the resource to serve, if the request was matched.contentType
- optional an override for the resource content type. By default it's automatically deduced from the file MIME type.
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
static void _setVoiceOver(BOOL enabled) { | |
NSString* const accessibilityUtilitiesPath = [[NSBundle bundleForClass:UIApplication.class] | |
.bundleURL | |
.URLByDeletingLastPathComponent | |
.URLByDeletingLastPathComponent | |
URLByAppendingPathComponent:@"PrivateFrameworks/AccessibilityUtilities.framework/AccessibilityUtilities"] | |
.relativePath; | |
void* handler = dlopen([accessibilityUtilitiesPath cStringUsingEncoding:NSUTF8StringEncoding], RTLD_NOW); | |
if (!handler) { | |
return; |
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
import PlaygroundSupport | |
PlaygroundPage.current.needsIndefiniteExecution = true | |
let reminderListName = "Test" | |
import EventKit | |
extension EKCalendarItem { | |
var hack_action: AnyObject? { | |
set { |
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
static NSString *const WMLTemplatedAnimationColorFillLayerName = @"WMLTemplatedAnimationFillLayerName"; | |
static NSString *const WMLTemplatedAnimationMaskLayerName = @"WMLTemplatedAnimationMaskLayerName"; | |
@interface UIImageView (WMLTemplatedAnimation) | |
- (void)wml_startAnimating; | |
- (void)wml_stopAnimating; | |
@end |
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
#import <UIKit/UIKit.h> | |
typedef NS_ENUM(NSInteger, DBGInterfaceStyleOverride) { | |
DBGInterfaceStyleOverrideNone = 0, | |
DBGInterfaceStyleOverrideLight, | |
DBGInterfaceStyleOverrideDark, | |
}; | |
#ifdef __cplusplus | |
extern "C" { |
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
#!/usr/bin/env node | |
const { exit } = require('process'); | |
const PREDEFINED_PATH = "~/Library/Group Containers/243LU875E5.groups.com.apple.podcasts/Documents/MTLibrary.sqlite"; | |
const XML_TEMPLATE = `<?xml version="1.0"?> | |
<!-- example OPML file --> | |
<opml version="1.0"> | |
<head> | |
<title>Overcast Podcast Subscriptions</title> |
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
struct Node<T> { // error: recursive value type 'Node<T>' is not allowed | |
var child: Node? | |
var value: T | |
init(value: T, child: Node? = nil) { | |
self.value = value | |
self.child = child | |
} | |
} |
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
javascript:document.getElementsByTagName('video')%5B0%5D.webkitEnterFullscreen() |
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
#import <Foundation/Foundation.h> | |
@interface Node : NSObject <NSCopying, NSMutableCopying> | |
@property (nonatomic, weak, readonly) Node *parent; | |
@property (nonatomic, strong, readonly) Node *left; | |
@property (nonatomic, strong, readonly) Node *right; | |
- (instancetype)initWithParent:(Node *)parent left:(Node *)left right:(Node *)right; | |
@end | |
@interface MutableNode : Node |
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
#!/usr/bin/env xcrun swift | |
// $ chmod +x script.swift | |
// $ ./script.swift | |
// or $ ./script.swift -xcode=/Applications/Xcode-beta.app | |
import Foundation | |
@noreturn private func failWithError(message: String) { | |
print("🚫 \(message)") |