Skip to content

Instantly share code, notes, and snippets.

View hanishassim's full-sized avatar
🎯
Focusing

Hanis hanishassim

🎯
Focusing
View GitHub Profile
@realvjy
realvjy / ChoasLinesShader.metal
Last active July 11, 2024 12:40
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
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"