Skip to content

Instantly share code, notes, and snippets.

Thomas Durand Dean151

Block or report user

Report or block Dean151

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Dean151
Dean151 / CryptoKitLottery.swift
Last active Jun 25, 2019
Generate Lottery Numbers using CryptoKit
View CryptoKitLottery.swift
// Written by Thomas Durand (c)2019 ; all right reserved
// See https://www.thomasdurand.fr/swift/cryptokit/2019/06/25/generating-lottery-numbers-with-cryptokit.html for more context
/// Represent one `k among n` operation
struct Draw {
/// The number of number to draw (ie k)
let draw: UInt
/// The range of numbers to draw within (ie n)
let among: ClosedRange<Int>
@Dean151
Dean151 / ReusableView.swift
Created Nov 19, 2016
Reusable view mechanism with Swift3 and Protocol Oriented Programming
View ReusableView.swift
//: Playground - noun: a place where people can play
import XCPlayground
import UIKit
protocol ReusableView {
/// The index of the current view to compare when this view is visible
var index: Int { get }
/// A static method that will be used to instanciate a new ReusableView when needed
You can’t perform that action at this time.