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 isRunning(NSString *bundleID) | |
{ | |
BKSSystemService *systemService = [[BKSSystemService alloc] init]; | |
pid_t pid = [systemService pidForApplication:bundleID]; | |
[systemService release]; | |
return pid != 0; | |
} |
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 <AVFoundation/AVFoundation.h> | |
@interface AVCaptureStillImageOutput (PrivateAPI) | |
- (void)captureStillImageSurfaceAsynchronouslyFromConnection:(AVCaptureConnection *)connection completionHandler:(void (^)(IOSurfaceRef photoSurfaceRef, NSInteger photoSurfaceSize, IOSurfaceRef photoPreviewSurfaceRef, NSInteger photoPreviewSurfaceSize, CFDictionaryRef photoProperties))completionHandler; | |
@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> | |
@interface UIImage (FlatImageWithColor) | |
- (UIImage *)_flatImageWithColor:(UIColor *)color; | |
@end | |
@implementation UIImage (FlatImageWithColor) | |
- (UIImage *)_flatImageWithColor:(UIColor *)color { | |
UIImage *flatImage = nil; |
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> | |
// ApplePushService.framework | |
@interface APSMessage : NSObject | |
- (id)initWithTopic:(NSString *)topic userInfo:(NSDictionary *)userInfo; | |
@end | |
@interface APSIncomingMessage : APSMessage | |
@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
static void setLandscapeProximityEnabled(BOOL enabled) | |
{ | |
UIDevice *dev = [UIDevice currentDevice]; | |
if (enabled) { | |
[dev _setExpectsFaceContactInLandscape:YES]; | |
dev.proximityMonitoringEnabled = YES; | |
} else { | |
dev.proximityMonitoringEnabled = NO; | |
[dev _setExpectsFaceContactInLandscape:NO]; | |
} |
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> | |
#import <CoreFoundation/CoreFoundation.h> | |
#import <CoreGraphics/CoreGraphics.h> | |
#import <CoreText/CoreText.h> | |
@interface EmojiUtilities : NSObject | |
+ (CFMutableCharacterSetRef)emojiCharacterSet; | |
+ (BOOL)containsEmoji:(NSString *)emoji; | |
@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
# Turn on Developer Mode | |
# Open Settings -> Update and Security -> For developers | |
# Don't reboot yet | |
# Run in powershell administrator: | |
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux | |
# accept reboot | |
## Install Ubuntu | |
# run in powershell administrator: |
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
%include "asm_io.inc" | |
extern _printf | |
segment data align=4 class=data use32 | |
EnterOne db "Enter number 1: ", 0 | |
EnterTwo db "Enter number 2: ", 0 | |
EnterThree db "Enter number 3: ", 0 | |
FormattedAnswer db "%d %d %d", 0 |
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
#!/bin/bash | |
APP_TARGETS=(com.apple.Photos com.apple.Preview com.apple.quicklook.QuickLookUIService com.apple.Safari) | |
for APP_TARGET in "${APP_TARGETS[@]}" | |
do | |
defaults write /Users/$USER/Library/Containers/$APP_TARGET/Data/Library/Preferences/com.apple.VisionKit.InternalSettings com.apple.VisionKit.InternalSettings.overrideDeviceAvailability -bool yes | |
done |
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
@interface YTUIUtils : NSObject | |
+ (UIViewController *)topViewControllerForPresenting; | |
@end | |
@interface YTUIResources : NSObject | |
+ (UIImage *)iconCheckTemplateImage; | |
+ (UIImage *)actionsheetDefaultImage; | |
@end | |
@interface YTActionSheetAction : NSObject |
OlderNewer