- CIDocumentEnhancer
- CIGaborGradients
- CIKeystoneCorrectionCombined
- CIKeystoneCorrectionHorizontal
- CIKeystoneCorrectionVertical
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
// TODO: Depend on https://github.com/21GramConsulting/Beton instead |
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
@available(iOS 15.0, *) | |
struct TaskPublisher<Output>: Publisher{ | |
typealias Failure = Never | |
let work: () async -> Output | |
init(work: @escaping () async -> Output) { | |
self.work = work | |
} |
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
// Based on this StackOverflow answer: https://stackoverflow.com/a/61273595/4239752 | |
import Foundation | |
import Combine | |
extension Publisher { | |
/// collects elements from the source sequence until the boundary sequence fires. Then it emits the elements as an array and begins collecting again. | |
func buffer<T: Publisher, U>(_ boundary: T) -> AnyPublisher<[Output], Failure> where T.Output == U { | |
let subject = PassthroughSubject<[Output], Failure>() |
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
// Download the "video GIF" | |
let data = try! Data(contentsOf: URL(string: "https://thumbs.gfycat.com/ThankfulLawfulAsianelephant-mobile.mp4")!) | |
let fileName = String(format: "%@_%@", ProcessInfo.processInfo.globallyUniqueString, "html5gif.mp4") | |
let url = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent(fileName) | |
try! data.write(to: url, options: [.atomic]) | |
// Do the converties | |
let asset = AVURLAsset(url: url) | |
guard let reader = try? AVAssetReader(asset: asset) else { | |
return |
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
name: Example iOS Build | |
on: | |
push: | |
branches: | |
- development | |
jobs: | |
build-ios: | |
runs-on: macos-latest |
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
// | |
// TYAudioVideoManager.swift | |
// Yash Thaker | |
// | |
// Created by Yash Thaker on 05/12/18. | |
// Copyright © 2018 Yash Thaker. All rights reserved. | |
// | |
/* | |
1) mergeVideos(videoUrls: [URL], exportUrl: URL, preset: String? = nil, progress: @escaping Progress, completion: @escaping Completion) |
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
// swift-tools-version:4.0 | |
import PackageDescription | |
#if os(Linux) | |
import Glibc | |
#else | |
import Darwin.C | |
#endif | |
enum Enviroment: String { |
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
# in order to download release artifacts from github, you have to first retreive the | |
# list of asset URLs using the github repo REST API. Use the asset URL to download | |
# the artifact as a octet-stream data stream. You will need to get an access token | |
# from "settings -> developer settings -> personal access tokens" on the github UI | |
#!/bin/bash -e | |
owner="MY_ORG_NAME" | |
repo="MY_REPO_NAME" | |
tag="ARTIFACT_TAG" | |
artifact="ARTIFACT_NAME" |
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 | |
@_exported import os.log | |
public extension OSLog { | |
convenience init(_ bundle: Bundle = .main, category: String? = nil) { | |
self.init(subsystem: bundle.bundleIdentifier ?? "default", category: category ?? "default") | |
} | |
convenience init(_ aClass: AnyClass, category: String? = nil) { |
NewerOlder