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/sh | |
var1=`sudo du -sh /Users/$USER/Library/Logs` | |
var2=`sudo du -sh /Library/Caches` | |
var3=`sudo du -sh /Users/$USER/Library/Caches` | |
var4=`sudo du -sh /var/folders/*` | |
var5=`sudo du -sh /System/Library/Caches` | |
var7=`sudo du -sh /Users/$USER/Library/Safari/Downloads.plist` | |
var8=`sudo du -sh /Library/Logs` | |
sudo rm -rf /Library/Logs |
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 <mach-o/dyld.h> | |
#import <objc/runtime.h> | |
#import <WebKit/WebKit.h> | |
@interface WKScriptMessage (WKScriptMessageLeakFix) | |
@end | |
@implementation WKScriptMessage (WKScriptMessageLeakFix) | |
+ (void)load { |
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
UIWindow *statusBar = [[UIApplication sharedApplication] performSelector:@selector(statusBarWindow)]; |
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
NSLog([NSThread currentThread] == [NSThread mainThread] ? @"❇️ Main thread, it is." : @"♒️ Doesn't look like main thread around here..."); |
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
<key>NSAppTransportSecurity</key> | |
<dict> | |
<key>NSExceptionDomains</key> | |
<dict> | |
<key>redalemeden.com</key> | |
<dict> | |
<key>NSIncludesSubdomains</key> | |
<true/> | |
<key>NSTKemporaryExceptionAllowsInsecureHTTPLoads</key> | |
<true/> |
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
NSLog(@"%@",[NSByteCountFormatter stringFromByteCount:data.length countStyle:NSByteCountFormatterCountStyleFile]); |
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
extension NSView { | |
var snapshot: NSImage { | |
guard let bitmapRep = bitmapImageRepForCachingDisplayInRect(bounds) else { return NSImage() } | |
bitmapRep.size = bounds.size | |
cacheDisplayInRect(bounds, toBitmapImageRep: bitmapRep) | |
let image = NSImage(size: bounds.size) | |
image.addRepresentation(bitmapRep) | |
return image | |
} | |
} |
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 UIColor (isLight) | |
- (CGFloat)lightness; | |
- (CGFloat)perceivedLightness; | |
- (CGFloat)perceivedLightnessW3C; | |
- (BOOL)isLight; | |
- (BOOL)isPerceivedLightW3C; | |
- (BOOL)isPerceivedLight; |
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 PhotosUI | |
import CoreTransferable | |
import SwiftUI | |
struct ContentView: View { | |
@ObservedObject var viewModel: FilterModel = .shared | |
var body: some View { | |
NavigationStack { | |
Gallery() |
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
SwiftUI Headers | |
#snippets | |
import Combine | |
import CoreData | |
import CoreFoundation | |
import CoreGraphics | |
import CoreText | |
import Darwin |