Skip to content

Instantly share code, notes, and snippets.

View iAmrSalman's full-sized avatar

Amr Salman iAmrSalman

View GitHub Profile
@iAmrSalman
iAmrSalman / .git-commit-template.txt
Created February 22, 2018 19:03 — forked from adeekshith/.git-commit-template.txt
This commit message template that helps you write great commit messages and enforce it across your team.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
UIFont.familyNames.sorted().forEach{ familyName in
print("*** \(familyName) ***")
UIFont.fontNames(forFamilyName: familyName).forEach { fontName in
print("\(fontName)")
}
print("---------------------")
}
/*
*** Academy Engraved LET ***
@iAmrSalman
iAmrSalman / swiftlint.sh
Created January 25, 2020 09:50 — forked from teameh/swiftlint.sh
Swiftlint pre-commit script
#!/bin/bash
set -e
if [ "$CI" == true ]; then
echo "CI == true, skipping this script"
exit 0
fi
SWIFT_LINT=./Pods/SwiftLint/swiftlint
@iAmrSalman
iAmrSalman / AVPlayer+Combine.swift
Created March 9, 2022 11:32 — forked from kshivang/AVPlayer+Combine.swift
Combine wrapper over AVPlayer.addPeriodicTimeObserver method. Use AVPlayer.periodicTimePublisher method instead.
import AVFoundation
import Combine
// simply use
// player.periodicTimePublisher()
// .receive(on: RunLoop.main)
// .assign(to: \SomeClass.elapsedTime, on: someInstance)
// .store(in: &cancelBag)