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
@propertyWrapper | |
public struct UserDefault<T>: UserDefaultSpec { | |
let key: String | |
let defaultValue: T | |
public init(_ key: String, defaultValue: T) { | |
self.key = key | |
self.defaultValue = defaultValue | |
} |
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
### Keybase proof | |
I hereby claim: | |
* I am ericlewis on github. | |
* I am ericlewis (https://keybase.io/ericlewis) on keybase. | |
* I have a public key ASBzIjHMyqm5H8e3230zlAxaBzQMVO1pSYwnw0a_TeEYYgo | |
To claim this, I am signing this object: |
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
const { gql } = require("apollo-server"); | |
const typeDefs = gql` | |
type PageInfo { | |
hasNextPage: Boolean | |
} | |
type ArtistEdge { | |
node: Artist | |
} |
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
// | |
// ContentView.swift | |
// CoreDataSwiftUISample | |
// | |
// Created by Eric Lewis on 8/8/19. | |
// Copyright © 2019 Eric Lewis, Inc. All rights reserved. | |
// | |
import SwiftUI | |
import CoreData |
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 SwiftUI | |
struct SearchNavigationView<Content: View>: UIViewControllerRepresentable { | |
@Binding var searchText: String | |
@Binding var scope: Int | |
var showScope: Bool = false | |
var content: () -> Content | |
func makeCoordinator() -> Coordinator { | |
Coordinator(self) |
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
@objc(ExampleViewManager) | |
class ExampleViewManager: RCTViewManager { | |
override func view() -> UIView! { | |
let scratchyView = ScratchyView() | |
scratchyView.delegate = self | |
return scratchyView | |
} | |
} | |
extension ExampleViewManager: ScratchyDelegate { |
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 SwiftUI | |
import ReSwift | |
// MARK: ReSwift Example Setup | |
struct AppState: StateType { | |
var counter: Int = 0 | |
} | |
struct CounterActionIncrease: Action {} |
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 Foundation | |
import CryptoKit | |
protocol PasswordProtocol { | |
var name: String {get} | |
var issuer: String? {get} | |
var image: URL? {get} | |
var generator: GeneratorProtocol {get} | |
} |
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
// | |
// ContentView.swift | |
// ContextMenyu | |
// | |
// Created by Eric Lewis on 9/19/19. | |
// Copyright © 2019 Eric Lewis, Inc. All rights reserved. | |
// | |
import SwiftUI |
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
class Page { | |
var layers: [Layer] = [] | |
init?(data: Data) { | |
let header = String(bytes: data[0...32], encoding: .utf8)!.last! | |
let input = InputStream(data: data[43...]) | |
input.open() | |