(mostly collected over the last 3-4 streams)
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
| /* ----------------------------- Scroll Masking ----------------------------- */ | |
| /* Custom properties for scroll-driven mask animations */ | |
| @property --mask-up-fade { | |
| syntax: "<length>"; | |
| inherits: false; | |
| initial-value: 0; | |
| } | |
| @property --mask-down-fade { |
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 Combine | |
| import SwiftUI | |
| struct CountdownView: View { | |
| @State private var countdown: Int = 15 * 60 | |
| @State private var displayedTime = "15:00" | |
| @State private var countdownTimer: AnyCancellable? | |
| @State private var isShowingLaurels = false | |
| @State private var isShowingExpiry = false |
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 SwiftUI | |
| struct ChatGPTTextField: View { | |
| // MARK: - State | |
| /// State to hold our `TextField` query. | |
| @State private var queryMessage: String = "" | |
| /// Focus state for our `TextField`. |
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 styles from './Apps.module.scss'; | |
| import { useEffect, useState } from 'react'; | |
| import Link from 'next/link'; | |
| const APPS = [ | |
| { | |
| title: 'APP', | |
| hero: 'Lorem ipsum dolor sit amet', | |
| description: | |
| 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do.', |
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
| struct Overlay: View { | |
| @State private var showLive = true | |
| @State private var isAnimationSlowed = false | |
| var body: some View { | |
| VStack { | |
| Spacer() | |
| HStack { | |
| Spacer() |
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 SwiftUI | |
| import PlaygroundSupport | |
| // NOTE: this example currently only works with US-based coordinates | |
| // constants | |
| // New York | |
| let latitude = 40.709335 | |
| let longitude = -73.956558 |
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
| // To see this run, you first stub out these imports. Then put the file in a Uint8Array. | |
| // let slice = new Slice(array); | |
| // let font = new OTFFont(slice); | |
| // Then you can call methods like font.drawText(canvasContext, ) | |
| // | |
| // | |
| import { ICanvasContext } from "./ICanvasContext" | |
| import { log as Log } from "./log" | |
| const log = Log.create("OPENTYPE"); |
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
| // https://davidpiesse.github.io/tailwind-md-colours/ | |
| // | |
| //Notes | |
| // | |
| //All colours are generated from Material Design Docs | |
| //Colours have a base, a set of shades (50-900) accent colours | |
| //In addition a companion set of contrast colours are included for colouring text / icons | |
| // Example usage | |
| // class="w-full bg-red-600 text-red-600-constrast" |
NewerOlder