I hereby claim:
- I am pedantix on github.
- I am pedantix (https://keybase.io/pedantix) on keybase.
- I have a public key ASDNHyZmWO9irQTz_xdXyyeKSeupkNvZXz5g2CXnFEdttQo
To claim this, I am signing this object:
import SwiftUI | |
struct StoreListCell: View { | |
var body: some View { | |
Text("A Store List Cell") | |
} | |
} | |
struct StoreListCell_Previews: PreviewProvider { | |
static var previews: some View { |
import SwiftUI | |
struct StoreListCell: View { | |
var body: some View { | |
Text("A Store List Cell") | |
} | |
} | |
struct StoreListCell_Previews: PreviewProvider { | |
static var previews: some View { |
import SwiftUI | |
#if DEBUG | |
struct PreviewGroup: ViewModifier { | |
func body(content: Content) -> some View { | |
Group { | |
content.preferredColorScheme(.dark) | |
content.preferredColorScheme(.light) | |
} | |
} |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/swift | |
// Usage Example: | |
// ./PostgresDbToLocal.swift vgsm-production-api very_good_sports_map_api shaunhubbard | |
import Foundation | |
extension Process { | |
public static func shell(command: String) -> String { | |
return Process().shell(command: command) |
router.get("teapot") { req -> Response in | |
let resp = req.makeResponse() | |
resp.http.status = .custom(code: 418, reasonPhrase: "I am teapot") | |
return resp | |
} |
final class Foo: PostgreSQLModel, Migration { | |
var id: Int? | |
} | |
final class Bar: PostgreSQLModel, Migration { | |
var id: Int? | |
} | |
final class Baz: PostgreSQLModel, Migration { |
final class MyUser: PostgreSQLModel { | |
static let idKey: WritableKeyPath<MyUser, Int?> = \MyUser.id | |
var id: Int? | |
var myParticipationsCount: Int = 0 | |
init(id: Int? = nil) { | |
self.id = id | |
} | |
} |
import Foundation | |
let anArray = [1, 2, 3, 4, 5] | |
extension Array where Element: Equatable { | |
func descendingElementalPairs() -> Array<Array<Element>> { | |
return self.enumerated() | |
.map { pair -> Array<Array<Element>> in | |
self[(pair.offset + 1)...].map { |
final class RouteLoggingMiddleware: Middleware, Service { | |
func respond(to request: Request, chainingTo next: Responder) throws -> Future<Response> { | |
let logger = try request.make(Logger.self) | |
let method = request.http.method | |
let path = request.http.uri.path | |
let query = request.http.uri.query | |
let reqString = "[\(method)]@\(path) with query:\(query)" |