Verify Permissions
diskutil verifyPermissions /
Repair Permissions
diskutil repairPermissions /
// | |
// NSObject+BlockObservation.h | |
// Version 1.0 | |
// | |
// Andy Matuschak | |
// [email protected] | |
// Public domain because I love you. Let me know how you use it. | |
// | |
#import <Cocoa/Cocoa.h> |
#define SingletonWithBlock(block) static dispatch_once_t pred = 0; \ | |
__strong static id _sharedObject = nil; \ | |
dispatch_once(&pred, ^{ \ | |
_sharedObject = block(); \ | |
}); \ | |
return _sharedObject; \ | |
@implementation SingletonClass | |
+ (id)sharedInstance |
#import "NSArray+Statistics.h" | |
@implementation NSArray (Statistics) | |
- (NSNumber *)sum { | |
NSNumber *sum = [self valueForKeyPath:@"@sum.self"]; | |
return sum; | |
} | |
- (NSNumber *)mean { |
#include <stdio.h> | |
/** | |
This only works if the block in question is called synchronously. | |
*/ | |
void try0() { | |
typedef void(^RecursiveBlock)(); | |
__block int i = 5; |
// | |
// PomodoroPicker.swift | |
// pomodoro | |
// | |
// Created by David Rozmajzl on 1/1/22. | |
// | |
import SwiftUI | |
struct PomodoroPicker<Content, Item: Hashable>: View where Content: View { |