Skip to content

Instantly share code, notes, and snippets.

View AchrafKassioui's full-sized avatar

Achraf Kassioui AchrafKassioui

View GitHub Profile
@overlair
overlair / Coordinate-Conversion.swift
Last active October 31, 2023 00:49
SpriteKit-Coordinate-Conversion
import SpriteKit
import SwiftUI
import Combine
enum ControlUpdate {
case tap(UITapGestureRecognizer) // print SpriteKit coordinate
case doubleTap // reset camera
case pan(UIPanGestureRecognizer) // move camera
@emin-grbo
emin-grbo / decodeOrReport.swift
Created February 13, 2024 10:39
DecodeOrReport
// Used to detect specific issue with JSON decoding
func decodeOrReport(data: Data) {
do {
let _ = try JSONDecoder().decode(WidgetResponse.self, from: data)
print("\n\n👍ALL GOOD\n\n")
} catch DecodingError.keyNotFound( let key, let context) {
print("\n\n⛔️FAILED TO DECODE\n\n")
print("could not find key \(key) in JSON: \(context.debugDescription)")
} catch DecodingError.valueNotFound( let type, let context) {
print("\n\n⛔️FAILED TO DECODE\n\n")
@rsms
rsms / macos-distribution.md
Last active April 21, 2025 04:05
macOS distribution — code signing, notarization, quarantine, distribution vehicles