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
| // | |
| // jailbreak_protect.c | |
| // | |
| // Created by Jonathan Cardasis (C) on 10/11/19. | |
| // Copyright © 2019 Jonathan Cardasis (C). All rights reserved. | |
| // | |
| // Source: https://medium.com/@joncardasis/mobile-security-jailbreak-protection-84aa0fbc7b23 | |
| // Simply include this file in your project and ensure the file's Target Membership | |
| // is set to your app. |
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
| javascript:document.getElementsByTagName('video')%5B0%5D.webkitEnterFullscreen() |
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 | |
| @dynamicMemberLookup | |
| enum JSON: Codable, CustomStringConvertible { | |
| var description: String { | |
| switch self { | |
| case .string(let string): return "\"\(string)\"" | |
| case .number(let double): | |
| if let int = Int(exactly: double) { | |
| return "\(int)" |
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 Dispatch | |
| /// Dispatch options for `forEach` loops | |
| public enum ForEachClosureDispatch { | |
| case sequential | |
| case concurrent | |
| } | |
| extension Sequence { | |
| /// Calls the given closure on each element in the sequence in the same order |
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
| // iOS 9 allows you to animate between visual effects, which gives you the | |
| // ability to manipulate the blur radius. this can be useful for animating | |
| // a backdrop for a custom modal, and with a few tricks, can even be set | |
| // indirectly, allowing you to "scrub" between them back and forth with | |
| // a gesture, just like when you pull down Spotlight. | |
| // these are the two effects you want to transition between | |
| UIVisualEffect *startEffect = nil; // "nil" means no blur/tint/vibrancy (plain, fully-transparent view) | |
| UIVisualEffect *endEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]; |
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
| // NSManagedObjectContext+DebugSwizzling.h | |
| #import <CoreData/CoreData.h> | |
| #if DEBUG | |
| /** | |
| * Toggles debugging of Core Data managed object contexts. | |
| * | |
| * When enabled, will fire NSLogs in the following cases: |
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
| // iOS ロックスクリーン Notification | |
| #define NotifName_LockComplete @"com.apple.springboard.lockcomplete" | |
| #define NotifName_LockState @"com.apple.springboard.lockstate" | |
| //call back | |
| static void lockStatusChanged(CFNotificationCenterRef center, void *observer, CFStringRef name_cf, const void *object, CFDictionaryRef userInfo){ | |
| NSString *name = (__bridge NSString*)name_cf; | |
| if ([name isEqualToString:NotifName_LockComplete]) { |
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
| /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user |
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
| expr -- (void)printf("[%s, %s]\n",(char *) object_getClassName(*(long*)($esp+4)), (char *) *(long *)($esp+8) ) |
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
| /* ---------------------------------------------------------- */ | |
| /* */ | |
| /* A media query that captures: */ | |
| /* */ | |
| /* - Retina iOS devices */ | |
| /* - Retina Macs running Safari */ | |
| /* - High DPI Windows PCs running IE 8 and above */ | |
| /* - Low DPI Windows PCs running IE, zoomed in */ | |
| /* - Low DPI Windows PCs and Macs running Firefox, zoomed in */ | |
| /* - Android hdpi devices and above */ |