Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096
// | |
// DarwinNotificationCenter.swift | |
// | |
// Copyright © 2017 WeTransfer. All rights reserved. | |
// | |
// Source: https://gist.github.com/florentmorin/35b15837cd4fb2a2a0630dbdf41d09aa | |
// Original: https://gist.github.com/AvdLee/07de0b0fe7dbc351541ab817b9eb6c1c | |
import Foundation |
import SwiftUI | |
extension Calendar { | |
func generateDates( | |
inside interval: DateInterval, | |
matching components: DateComponents | |
) -> [Date] { | |
var dates: [Date] = [] | |
dates.append(interval.start) |
// | |
// UIView+RSKeyboardLayoutGuide.swift | |
// RSTouchUIKit | |
// | |
// Created by Daniel Jalkut on 12/23/18. | |
// | |
import UIKit | |
// Extends UIView to expose a keyboardLayoutGuide property that can be used to tie a view controller's content |
// Advanced SwiftUI Transitions | |
// https://swiftui-lab.com | |
// https://swiftui-lab.com/advanced-transitions | |
import SwiftUI | |
struct CrossEffectDemo: View { | |
let animationDuration: Double = 2 | |
let images = ["photo1", "photo2", "photo3", "photo4"] | |
@State private var idx = 0 |
// | |
// TimingFunction.swift | |
// | |
// Created by tcldr on 04/11/2018. | |
// https://github.com/tcldr | |
// Copyright © 2018 tcldr. | |
// | |
// Permission is hereby granted, free of charge, | |
// to any person obtaining a copy of this software and | |
// associated documentation files (the "Software"), to |
// US locale: | |
// Oct 14, 2020, 7:50 PM | |
Date().format(with: [.monthShort, .dayOfMonth, .yearFull, .hour, .minute], locale: Locale(identifier: "en_US"))! | |
// French locale: | |
// 14 Oct 2020 à 19:50 | |
Date().format(with: [.monthShort, .dayOfMonth, .yearFull, .hour, .minute], locale: Locale(identifier: "fr"))! |
import Darwin | |
@dynamicMemberLookup | |
struct Environment { | |
subscript(dynamicMember name: String) -> String? { | |
get { | |
guard let value = getenv(name) else { return nil } | |
return String(validatingUTF8: value) | |
} |
- (void)detectWithImageURL:(NSURL *)URL | |
{ | |
VNImageRequestHandler *handler = [[VNImageRequestHandler alloc] initWithURL:URL options:@{}]; | |
VNDetectTextRectanglesRequest *request = [[VNDetectTextRectanglesRequest alloc] initWithCompletionHandler:^(VNRequest * _Nonnull request, NSError * _Nullable error) { | |
if (error) { | |
NSLog(@"%@", error); | |
} | |
else { | |
for (VNTextObservation *textObservation in request.results) { | |
// NSLog(@"%@", textObservation); |