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
| enum Planet: Int { | |
| case mercury, venus, earth, mars, jupiter, saturn, uranus, neptune | |
| // case pluto | |
| static var gasGiants: Set<Planet> = [.jupiter, .saturn] | |
| } | |
| let planet: Planet = .jupiter | |
| if Planet.gasGiants.contains(planet) { |
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
| enum Planet: Int { | |
| case mercury, venus, earth, mars, jupiter, saturn, uranus, neptune | |
| } | |
| struct PlanetOptions { | |
| let planets: Set<Planet> | |
| private init(_ planets: Set<Planet>) { | |
| self.planets = planets | |
| } |
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
| class PassthroughContainer: UIView { | |
| override func point(inside point: CGPoint, with event: UIEvent?) -> Bool { | |
| guard super.point(inside: point, with: event) else { | |
| return false | |
| } | |
| for subview in self.subviews where subview.isUserInteractionEnabled { | |
| let subPoint = self.convert(point, to: subview) | |
| if subview.point(inside: subPoint, with: event) { | |
| return 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
| protocol EditorViewController { | |
| associatedtype Item: EditableItem | |
| var item: Item? { get set } | |
| } | |
| protocol EditableItem { | |
| associatedtype Editor: EditorViewController & NSViewController | |
| static var editorSceneId: NSStoryboard.SceneIdentifier { get } | |
| } |
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 | |
| // MARK: - Basic Implementation | |
| struct SortDescriptor<Element> { | |
| let compare: (Element, Element) -> ComparisonResult | |
| } | |
| private func compare<Element>(_ lhs: Element, _ rhs: Element, _ descriptors: [SortDescriptor<Element>]) -> Bool { | |
| for descriptor in descriptors { |
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
| git config --global diff.json.textconv "f() { cat \"${1}\" | jq --sort-keys .; }; f" |
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
| // | |
| // ViewController.swift | |
| // ModalTest2 | |
| // | |
| // Created by Jayson Rhynas on 2018-11-21. | |
| // Copyright © 2018 Jayson Rhynas. All rights reserved. | |
| // | |
| import UIKit |
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
| ///////////////// | |
| // MyFramework // | |
| ///////////////// | |
| // Instrument.swift | |
| @objc public class Instrument: NSManagedObject { | |
| } |
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
| #0 0x0000000103dd5c80 in swift_checkMetadataState () | |
| #1 0x0000000103da16bc in type metadata completion function for ClosedRange<>.Index () | |
| #2 0x0000000103dd8e24 in swift::MetadataCacheEntryBase<(anonymous namespace)::GenericCacheEntry, void const*>::doInitialization(swift::ConcurrencyControl&, swift::MetadataCompletionQueueEntry*, swift::MetadataRequest) () | |
| #3 0x0000000103dd0168 in swift_getGenericMetadata () | |
| #4 0x0000000103c505f8 in type metadata accessor for Optional () | |
| #5 0x0000000101286afc in BaseMappable.init(JSONString:context:) () | |
| #6 0x000000010156926c in LoopAudioUser.init(metadata:song:) at /Users/jayson/Developer/Medly/Medly/Loop/LoopAudioUser.swift:71 |
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
| $HOME/.config/git/attributes: | |
| *.json diff=json | |
| $HOME/.gitconfig: | |
| [diff "json"] | |
| textconv = "f() { cat \"${1}\" | jq --sort-keys .; }; f" |