This file contains 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 AVFoundation | |
import RxCocoa | |
import RxSwift | |
protocol CameraManagerDelegate: AnyObject { | |
func didStartRecord() | |
func didCapturedImage(_ image: CapturedImage) | |
func videoCapture(didCaptureVideoFrame pixelBuffer: CVPixelBuffer) | |
} |
This file contains 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
extension UIHostingController { | |
convenience public init(rootView: Content, ignoreSafeArea: Bool) { | |
self.init(rootView: rootView) | |
if ignoreSafeArea { | |
disableSafeArea() | |
} | |
} | |
func disableSafeArea() { |
General iOS, CS questions and interview prep resources.
-
iOS Interview Questions for Senior Developers (useful even if you're not senior yet)
This file contains 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
#!/bin/bash | |
# | |
# Script to bump the build number and optionally the marketing version found | |
# in *.info files. | |
# | |
# Usage: bump-version.sh [ARG] | |
# | |
# Without ARG, just increment the build number. When ARG is present, it indicates | |
# which part of the marketing version to increment: | |
# |
This file contains 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
Add | |
scrub on bridge100 all min-ttl 65 | |
to | |
'/etc/pf.conf' | |
Reload with | |
sudo pfctl -f /etc/pf.conf | |
Check with | |
sudo pfctl -sa |
This file contains 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
//Credit to https://gist.github.com/merlos All copyright & credit goes to him | |
import Foundation | |
extension Date { | |
/// | |
/// Provides a humanised date. For instance: 1 minute, 1 week ago, 3 months ago | |
/// | |
/// - Parameters: | |
// - numericDates: Set it to true to get "1 year ago", "1 month ago" or false if you prefer "Last year", "Last month" |
NewerOlder