If you're used to solving cryptic puzzles, or deciphering texts using crypt-analytical cribs, it can be useful to know the relative frequency of letters in the distribution of words. Wordle has a built-in list of 5-letter words. That list isn't the same as all of the five letter words in the dictionary, or even only the common ones. Perfectly common words like 'tudor' are omitted. This gist contains a few useful tables that are worth familiarizing yourself with if you want to solve wordle puzzles logically.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private protocol SilenceDeprecationForUIScreenWindows { | |
var screens: [UIScreen] { get } | |
} | |
private final class SilenceDeprecationForUIScreenWindowsImplementation: SilenceDeprecationForUIScreenWindows { | |
@available(iOS, deprecated: 16) | |
var screens: [UIScreen] { UIScreen.screens } | |
} | |
extension UIScreen { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Blur.swift | |
// | |
// | |
// Created by Ethan Lipnik on 11/21/22. | |
// | |
import SwiftUI | |
private struct BlurModifier: ViewModifier { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CompareEquatableProperties.swift | |
// ListableUI | |
// | |
// Created by Kyle Van Essen on 7/28/22. | |
// | |
import Foundation | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import Foundation | |
// NOTE: This playground shows how to use Swift's AttributedString with Markdown. | |
// | |
// This code was used to display Markdown content in the Tot iOS Widget <https://tot.rocks> | |
// MARK: - Helpful Links | |
// NOTE: The following links helped me figure this stuff out. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if DEBUG | |
/* | |
This fixes SwiftUI previews not rendering translucent materials correctly by | |
swizzling a couple of properties on NSWindow. | |
Just drop into your project and add to the target being previewed (or something it links against). | |
Notice the #if DEBUG, so this code won't end up in release builds. It also checks for the | |
XCODE_RUNNING_FOR_PREVIEWS environment variable so that it won't affect regular debug builds of the app. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Error { | |
var code: Int { return (self as NSError).code } | |
var domain: String { return (self as NSError).domain } | |
var userInfo: [String:Any] { return (self as NSError).userInfo } | |
func timeAfterWhichToRetry(retryCount: Int) -> TimeInterval? { | |
// CloudKit suggests us retry too often, so slow us down as we retry a lot, up to 5 minutes | |
if let suggestedTimeout = suggestedTimeAfterWhichToRetry { | |
if suggestedTimeAfterWhichToRetry == 0 { | |
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A view that can flip between its "front" and "back" side. | |
// | |
// Animation implementation based on: | |
// Chris Eidhof, Keyframe animations <https://gist.github.com/chriseidhof/ea0e435197f550b195bb749f4777bbf7> | |
import SwiftUI | |
// MARK: - Chris's keyframe animation design | |
struct Keyframe<Data: Animatable> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AppDelegate.swift | |
// Dock Shooter | |
// | |
// Created by Shihab Mehboob on 01/11/2021. | |
// | |
import Cocoa | |
@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2021 Kyle Hughes | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | |
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation the | |
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | |
// permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
// | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the | |
// Software. | |
// |
NewerOlder