Skip to content

Instantly share code, notes, and snippets.

View hanishassim's full-sized avatar
🎯
Focusing

Hanis hanishassim

🎯
Focusing
View GitHub Profile
import AVFoundation
import RxCocoa
import RxSwift
protocol CameraManagerDelegate: AnyObject {
func didStartRecord()
func didCapturedImage(_ image: CapturedImage)
func videoCapture(didCaptureVideoFrame pixelBuffer: CVPixelBuffer)
}
extension UIHostingController {
convenience public init(rootView: Content, ignoreSafeArea: Bool) {
self.init(rootView: rootView)
if ignoreSafeArea {
disableSafeArea()
}
}
func disableSafeArea() {
@funmia
funmia / ios-interview-resources.md
Last active September 2, 2023 07:29
General iOS, CS questions and interview prep resources.
@bradhowes
bradhowes / bump-version.sh
Last active December 6, 2023 07:51
Bash script to increase build number and optionally marketing version of Xcode targets using Apple's `agvtool`
#!/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:
#
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
@hanishassim
hanishassim / timeago.swift
Last active November 1, 2018 11:20
Time Ago Swift Date Extension
//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"

Upload images to GitHub

  1. Create a new issue on GitHub.

  2. Drag an image into the comment field.

  3. Wait for the upload process to finish.

  4. Copy the URL and use it in your Markdown files on GitHub.