This file contains hidden or 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 UIKit based Playground for presenting user interface | |
import SwiftUI | |
import PlaygroundSupport | |
struct SlideDemo: View { | |
@State var activePage = 0 | |
var body: some View { | |
// Change this VStack to a List and the animation breaks |
This file contains hidden or 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
// This is intended to be dropped in a Playground. | |
import Foundation | |
let json = | |
""" | |
{ | |
"name": "Casey's Corner", | |
"menu": [ | |
{ |
This file contains hidden or 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 Foundation | |
import Combine | |
public struct RatingsFetcher { | |
/// Asynchronously gets the number of ratings for the current version of the given app. | |
/// - Parameter appId: App ID to look up | |
/// - Returns: Count of ratings for the current version | |
public static func ratingsForCurrentVersion(appId: Int) async throws -> Int { | |
guard let url = URL(string: "https://itunes.apple.com/lookup?id=\(appId)") else { |
This file contains hidden or 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 SwiftUI | |
import PlaygroundSupport | |
/* ***************************************** | |
* GeometryReader with PreferenceKey | |
* *****************************************/ | |
struct HeightPreferenceKey: PreferenceKey { | |
static let defaultValue: CGFloat = 0 |
This file contains hidden or 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 datetime | |
import json | |
import os | |
import subprocess | |
import sys | |
############# | |
### USAGE ### | |
############# |
This file contains hidden or 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 | |
public typealias RowSectionPair = (row: Int, section: Int) | |
extension IndexPath: RawRepresentable { | |
public typealias RawValue = RowSectionPair | |
public init?(rawValue: RowSectionPair) { | |
self = IndexPath(row: rawValue.row, section: rawValue.section) | |
} |
This file contains hidden or 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 Foundation | |
class ListOfIntegers: Sequence { | |
typealias Element = Int | |
private var backingStore = [Int]() | |
init() {} | |
init(_ value: [Int]) { | |
self.backingStore = value | |
} |
This file contains hidden or 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
cask_args appdir: "/Applications" | |
tap "homebrew/cask-fonts" | |
brew "mas" | |
#### LAPTOPS #### | |
#cask "tripmode" | |
#### LAPTOPS #### | |
mas "Boop", id: 1518425043 |
This file contains hidden or 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
// | |
// SearchController.swift | |
// Prefer | |
// | |
// Created by Bryan Irace on 5/31/17. | |
// Copyright © 2017 Prefer. All rights reserved. | |
// | |
import RxSwift | |
import RxCocoa |
This file contains hidden or 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
+--------+---------+-------------------------+ | |
| Series | Episode | Description | | |
+--------+---------+-------------------------+ | |
| 7 | 7 | Winter Olympics | | |
| 0 | 12 | Polar Challenge | | |
| 9 | 3 | Southeast America | | |
| 10 | 4 | Botswana | | |
| 12 | 8 | Vietnam | | |
| 14 | 6 | Bolivia | | |
| 0 | 33 | Northeast America | |
NewerOlder