Skip to content

Instantly share code, notes, and snippets.

View dougritter's full-sized avatar

Douglas Ritter dougritter

View GitHub Profile
@digoreis
digoreis / BinaryTree.swift
Created June 29, 2018 14:07
A sample for BinaryTree with Enum.
import Cocoa
indirect enum BinaryTree<T> {
case node(BinaryTree, T, BinaryTree)
case empty
}
extension BinaryTree {
static func leaf(_ value: T) -> BinaryTree {
import Cocoa
@propertyWrapper
struct Clapping<Value: Comparable> {
var value: Value
let range: ClosedRange<Value>
init(wrappedValue: Value, _ range: ClosedRange<Value>) {
precondition(range.contains(wrappedValue))
@carlosefonseca
carlosefonseca / TDCards.js
Last active November 8, 2021 12:26
iOS Home Screen Widget for Scriptable (https://scriptable.app) displaying the amount on a Prize Card and a Dá Card.
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: cyan; icon-glyph: wallet;
// Card Number
const prizeCardAmount = (await prizeCard("1234567890123456")).amount
// Username, Password, Date
const daCardAmount = (await daCard("username", "password", "31081980"))