I hereby claim:
- I am karlis on github.
- I am karlis (https://keybase.io/karlis) on keybase.
- I have a public key whose fingerprint is 39C5 35D6 BD6F 6DDE BDCE E93B E048 1EB5 BCA5 46CD
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
/// ReusableCell for easy dequeueing in table views. Use UITableView.dequeueReusableCell(). | |
protocol ReusableCell { | |
static var reuseIdentifier: String { get } | |
init() | |
} | |
extension UITableView { | |
/// Dequeues a ReusableCell or allocates a new ReusableCell. | |
func dequeueReusableCell<Cell: ReusableCell>() -> Cell { | |
return dequeueReusableCell(withIdentifier: Cell.reuseIdentifier) as? Cell ?? Cell() |
public struct Day10 { | |
var adapterTypes: [Bool] | |
public init(input: String) { | |
var parsed = Self.parse(input) | |
parsed.append(0) | |
adapterTypes = parsed | |
.sorted() | |
.slidingWindows(ofCount: 2) // import swift-algorithms |
// 64802175715999 | |
public let d20 = """ | |
Tile 2897: | |
####..##.. | |
.........# | |
.......... | |
.#........ | |
##......## | |
.......#.. | |
...#...##. |
struct Food { | |
let ingredient: Set<String> | |
let allergens: Set<String> | |
} | |
func parse(_ input: String) -> [Food] { | |
return input | |
.components(separatedBy: .newlines) | |
.map { | |
let parts = $0.components(separatedBy: " (contains ") |
// | |
// Example.swift | |
// Vinyl | |
// | |
// Created by Karlis Lukstins on 16/02/2021. | |
// | |
import SwiftUI | |
// MARK: - Example |
[filter "lfs"] | |
required = true | |
clean = git-lfs clean -- %f | |
smudge = git-lfs smudge -- %f | |
process = git-lfs filter-process | |
[user] | |
name = Karlis Lukstins | |
email = karlis@lukstins.com | |
[alias] | |
b = !git branch |