Protection Domain (pdmn) | Keychain Accessibility Values |
---|---|
ck |
kSecAttrAccessibleAfterFirstUnlock |
cku |
kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly |
dk |
kSecAttrAccessibleAlways |
akpu |
kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly |
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
!/bin/zsh | |
git_path_dates() { | |
if [ -z "$1" ]; then | |
echo "Usage: git_path_dates <path>" | |
return 1 | |
fi | |
filepath="$1" | |
first_commit_date=$(git log --reverse --format="%cd" --date=format:"%Y-%m-%d" -- "$filepath" | head -n 1) |
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
@resultBuilder | |
enum ArrayBuilder<OutputModel> { | |
static func buildEither(first component: [OutputModel]) -> [OutputModel] { | |
return component | |
} | |
static func buildEither(second component: [OutputModel]) -> [OutputModel] { | |
return component | |
} |
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
exec > /tmp/${PROJECT_NAME}_archive.log 2>&1 | |
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
if [ "true" == ${ALREADYINVOKED:-false} ] | |
then | |
echo "RECURSION: Detected, stopping" | |
else | |
export ALREADYINVOKED="true" |
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
struct WeakBox<ItemType: AnyObject> { | |
weak var item: ItemType? | |
init(item: ItemType?) { | |
self.item = item | |
} | |
} |
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
//Combine colors: add, subtract, multiply components, set and adjust color components | |
import UIKit | |
func + (left: UIColor, right: UIColor) -> UIColor { | |
var leftRGBA = [CGFloat](repeating: 0.0, count: 4) | |
var rightRGBA = [CGFloat](repeating: 0.0, count: 4) | |
left.getRed(&leftRGBA[0], green: &leftRGBA[1], blue: &leftRGBA[2], alpha: &leftRGBA[3]) | |
right.getRed(&rightRGBA[0], green: &rightRGBA[1], blue: &rightRGBA[2], alpha: &rightRGBA[3]) |
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
// | |
// CoalesceOperation.swift | |
// RequestCoalesce | |
// | |
// Created by Nicholas Cross on 4/12/2016. | |
// Copyright © 2016 Nicholas Cross. All rights reserved. | |
// | |
import Foundation |
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/Foundation.h> | |
#import <BMGlyphLabel/BMGlyphFont.h> | |
@interface BMGlyphFont (MMCache) | |
+ (BMGlyphFont *) cachedFontWithName:(NSString *)name; | |
@end |