Skip to content

Instantly share code, notes, and snippets.

View shadone's full-sized avatar

Denis Dzyubenko shadone

  • Oslo, Norway
View GitHub Profile
JS:
import { DeliveryMethod, WebhookHandler } from "@shopify/shopify-api";
export default {
Foo: { // the value is of type WebhookHandler
deliveryMethod: DeliveryMethod.Http
}
}
private var titleAttributes: AnyPublisher<[NSAttributedString.Key: Any], Never> {
appearance.textSizeAdjustmentPublisher
.combineLatest(isRead)
.map { textSizeAdjustment, isRead -> [NSAttributedString.Key: Any] in
[
.font: UIFont.scaledSystemFont(
style: .title2,
relativeSize: textSizeAdjustment,
weight: .medium
),
@shadone
shadone / gist:9c1af9da368ec19025fc69b763b034bc
Last active January 9, 2024 23:24
Updating .sheet size at runtime in SwiftUI
import SwiftUI
extension PresentationDetent {
static let small = PresentationDetent.height(200)
}
struct Item: Identifiable, Hashable {
let title: String
var id: String { title }
//
// ContentView.swift
// test
//
// Created by Philip Young on 16/04/21.
//
import SwiftUI
struct Item: Identifiable {
import SwiftUI
struct Item: Identifiable {
var id: String { "abc" }
var title: String = "abcfoo"
}
extension View {
func popup<Item, Content>(item: Binding<Item?>, @ViewBuilder content: (Item) -> Content) -> some View where Item: Identifiable, Content: View {
return ZStack(alignment: .top, content: {
Process: Session [32825]
Path: /Applications/Session.app/Contents/MacOS/Session
Identifier: com.philipyoungg.session
Version: 2.2.6 (20209)
App Item ID: 1521432881
App External ID: 841424710
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Session [32825]
User ID: 501
https://www.icloud.com/iclouddrive/0wxUpK4I4yWqad5FKSYZG2gRA#aktivitetsbingo-uke-12-skj3
https://www.icloud.com/iclouddrive/0SdmETTScmlZjNRp1Yas6niOw#hjemmeskole-mandag-22-03-skj3
/// A convenience wrapper allowing to define Decodable properties of type enum that can contain yet unknown values.
///
/// e.g.
/// ```
/// enum Color: String, Decodable, RawRepresentable {
/// case red
/// case cherryRed = "#dd0000"
/// case green
/// }
///
$ cat Gemfile [~/dev/com.schibsted/vgnext/ios]
source "https://rubygems.org"
gem 'fastlane', '~> 2.98.0'
gem 'slather', '~> 2.4.5'
gem 'cocoapods', '~> 1.4.0'
gem 'cocoapods-acknowledgements', '~> 1.1.2'
$ grep cocoapods Gemfile.lock [~/dev/com.schibsted/vgnext/ios]
cocoapods (1.4.0)
cocoapods-core (= 1.4.0)
Verifying that +ddenis is my blockchain ID. https://onename.com/ddenis