Skip to content

Instantly share code, notes, and snippets.

View zoejessica's full-sized avatar
🐗

Zoë Smith zoejessica

🐗
View GitHub Profile
@zoejessica
zoejessica / Activity.swift
Created July 8, 2017 14:33 — forked from zwaldowski/Activity.swift
os_activity_t for Swift 3
//
// Activity.swift
//
// Created by Zachary Waldowski on 8/21/16.
// Copyright © 2016 Zachary Waldowski. Licensed under MIT.
//
import os.activity
private final class LegacyActivityContext {
@zoejessica
zoejessica / PagerView.swift
Created December 26, 2019 21:58 — forked from mecid/PagerView.swift
PagerView in SwiftUI
//
// PagerView.swift
//
// Created by Majid Jabrayilov on 12/5/19.
// Copyright © 2019 Majid Jabrayilov. All rights reserved.
//
import SwiftUI
struct PagerView<Content: View>: View {
let pageCount: Int
@zoejessica
zoejessica / Withable.swift
Created April 24, 2020 23:33 — forked from nicklockwood/Withable.swift
Withable.swift
/// Withable is a simple protocol to make constructing
/// and modifying objects with multiple properties
/// more pleasant (functional, chainable, point-free)
public protocol Withable {
init()
}
public extension Withable {
/// Construct a new instance, setting an arbitrary subset of properties
init(with config: (inout Self) -> Void) {
@zoejessica
zoejessica / DarwinNotificationCenter.swift
Created April 26, 2020 00:22 — forked from AvdLee/DarwinNotificationCenter.swift
A notification center for Darwin Notifications. MIT License applies.
//
// DarwinNotificationCenter.swift
//
// Copyright © 2017 WeTransfer. All rights reserved.
//
import Foundation
/// A Darwin notification payload. It does not contain any userInfo, a Darwin notification is purely event handling.
public struct DarwinNotification {