Skip to content

Instantly share code, notes, and snippets.

View narciszait's full-sized avatar

Narcis narciszait

  • App developer
  • Copenhagen, Denmark
View GitHub Profile
@jacobsapps
jacobsapps / Jacob Bartlett.tex
Last active September 16, 2024 20:06
Resume
\documentclass[11pt, oneside]{article}
\usepackage[margin=0.5in]{geometry}
\geometry{letterpaper}
\usepackage[parfill]{parskip}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{xcolor}
\pagecolor{white}
\usepackage[colorlinks = true, linkcolor = blue, urlcolor = blue]{hyperref}
\pagestyle{empty}
@Berhtulf
Berhtulf / ci_post_xcodebuild.sh
Last active January 24, 2025 16:07
Xcode Cloud - CI/CD Push tag to Github
# 1. Create 'ci_scripts' folder in your main project directory
# 2. Create 'ci_post_xcodebuild.sh' inside of it
# 3. Make it an executable by running 'chmod +x $ci_post_xcodebuild.sh'
set -e # fails build if any command fails
if [ ${CI_XCODEBUILD_EXIT_CODE} != 0 ]
then
exit 1
fi
//
// CacheAsyncImage.swift
//
// Created by Costantino Pistagna on 08/02/23.
//
import SwiftUI
struct CacheAsyncImage<Content, Content2>: View where Content: View, Content2: View {
private let url: URL?
//
// LikeView.swift
// lottie-first
//
// Created by Matthew Young on 12/31/22.
//
import SwiftUI
import Lottie
@alexito4
alexito4 / Task.swift
Created October 12, 2022 21:21
SwiftUI View.task backwards compatibility
import Foundation
import SwiftUI
public extension View {
@available(iOS, obsoleted: 15.0, message: "SwiftUI.View.task is available on iOS 15.")
@_disfavoredOverload
@inlinable func task(
priority: _Concurrency.TaskPriority = .userInitiated,
@_inheritActorContext _ action: @escaping @Sendable () async -> Swift.Void
) -> some SwiftUI.View {
import UIKit
// Reference Video: https://youtu.be/iqpAP7s3b-8
struct AnchoredConstraints {
var top, leading, bottom, trailing, width, height: NSLayoutConstraint?
}
let DeviceSize = UIScreen.main.bounds.size
@doozMen
doozMen / LocalNetworkAuthorization.swift
Created February 25, 2022 15:44
Uses bonjour networking to relialby check if user has granted local network access with async await as of iOS14
import Foundation
import Network
/// Uses bonjour networking to relialby check if user has granted local network access
/// How to use:
/// Add LocalNetworkAuthorization class to your project
/// Open .plist file and add "_bonjour._tcp", "_lnp._tcp.", as a values under "Bonjour services"
/// Call requestAuthorization() to trigger the prompt or get the authorization status if it already been approved/denied
/// about the author: https://stackoverflow.com/a/67758105/705761
@ktustanowski
ktustanowski / VNClassifyImageRequest.Supportedidentifiers.txt
Last active January 12, 2022 19:39
Contains a list of supported identifiers for VNClassifyImageRequest (VNClassifyImageRequestRevision1).
▿ 1303 elements
- 0 : "abacus"
- 1 : "accordion"
- 2 : "acorn"
- 3 : "acrobat"
- 4 : "adult"
- 5 : "adult_cat"
- 6 : "agriculture"
- 7 : "aircraft"
- 8 : "airplane"
@tkhelm
tkhelm / CoreDataWithCombine.swift
Last active December 27, 2023 08:37
CoreDataWithCombine
//******* STORAGE MODEL ****************
import CoreData
import Combine
class URLMetadataStorage: NSObject, ObservableObject {
static let shared = URLMetadataStorage()
let parentContext = PersistenceController.shared.container.viewContext
// Author: SwiftUI-Lab (www.swiftui-lab.com)
// Description: This code is part of the "Advanced SwiftUI Animations - Part 5"
// Article: https://swiftui-lab.com/swiftui-animations-part5/
import SwiftUI
struct ContentView: View {
var body: some View {
DigitalRain()
}