I hereby claim:
- I am josephduffy on github.
- I am josephduffy (https://keybase.io/josephduffy) on keybase.
- I have a public key ASBeGhM8RITtTJSpJG6YexBC2RqJkf5uaM3U5jndy8vNhwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import Foundation | |
struct Partial<Wrapped>: CustomStringConvertible, CustomDebugStringConvertible { | |
enum Error<ValueType>: Swift.Error { | |
case missingKey(KeyPath<Wrapped, ValueType>) | |
case invalidValueType(key: KeyPath<Wrapped, ValueType>, actualValue: Any) | |
} | |
private var values: [PartialKeyPath<Wrapped>: Any?] = [:] |
import Foundation | |
import os.log | |
public protocol StateMachineDelegate: class { | |
associatedtype StateType: Hashable | |
/// Invoked before a transition is about to occur, allowing you to reject even a valid transition. Defaults to true | |
/// | |
/// - Parameters: |
To install add to ~/.config/fish/functions/
. This can be done manually or via curl -o ~/.config/fish/functions/fastlane.fish https://gist.githubusercontent.com/JosephDuffy/596821c21b6810dd0c82639b1c6b8a64/raw/fastlane.fish
This function has 2 primary advantages:
bundle exec
before fastlane
commandsfastlane enable_auto_complete
Disclamer: My fish scripting skills aren't exactly 💯. If you have any suggestions for improvements please tweet them at me!
UIImageView
address (e.g. via view debugger)po [UIImagePNGRepresentation((UIImage *)[_address_ image]) base64EncodedStringWithOptions:0]
pbpaste | base64 -D > image.png
// A version of main.swift that is closer to https://stackoverflow.com/questions/50937765/why-does-wrapping-os-log-cause-doubles-to-not-be-logged-correctly/50942917#50942917, a linked by https://twitter.com/caseyliss/status/1268555666412765184 | |
import Foundation | |
import os.log | |
import os | |
class OSLogWrapper { | |
func logDefaultariadicArg(_ message: StaticString, _ args: CVarArg... ) { | |
os_log(message, type: .default, args) |
/** | |
Copyright 2020 Joseph Duffy | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE |
public struct ReadableWidthView<Content: View>: UIViewControllerRepresentable { | |
public typealias UIViewControllerType = UIViewController | |
private let content: Content | |
init(@ViewBuilder content: () -> Content) { | |
self.content = content() | |
} | |
public func makeUIViewController(context: Context) -> UIViewController { |