Skip to content

Instantly share code, notes, and snippets.

View DagAgren's full-sized avatar

Dag Ågren DagAgren

View GitHub Profile
@DagAgren
DagAgren / 1. PluralCount.swift
Last active February 8, 2023 00:01
Unicode plural rules for integers
public enum PluralCount {
case zero
case one
case two
case few
case many
case other
}
extension PluralCount {
@DagAgren
DagAgren / DataObjects.swift
Last active March 11, 2020 15:05
Receiving web push notifications on iOS, using the toot-relay forwarder
import Foundation
struct PushNotification: Codable {
let accessToken: String
let preferredLocale: String
let notificationId: Int64
let notificationType: Type
let icon: URL
let title: String
let body: String

Keybase proof

I hereby claim:

  • I am DagAgren on github.
  • I am waha_06x36 (https://keybase.io/waha_06x36) on keybase.
  • I have a public key whose fingerprint is AF55 29D6 6BCC FCCC E952 496F D8A7 65A9 C459 4A6B

To claim this, I am signing this object: