Source: https://developers.soundcloud.com/blog/pr-templates-for-effective-pull-requests
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
find . -not \( -name .git -prune \) -type f -print0 | LANG=C LC_CTYPE=C xargs -0 sed -i '' -E "s/[[:space:]]*$//" |
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 Sequence { | |
/// Returns an array containing, in order, the first instances of | |
/// elements of the sequence that compare equally for the keyPath. | |
func unique<T: Hashable>(for keyPath: KeyPath<Element, T>) -> [Element] { | |
var unique = Set<T>() | |
return filter { unique.insert($0[keyPath: keyPath]).inserted } | |
} | |
} | |
extension RangeReplaceableCollection { |
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 SwiftUI | |
extension View { | |
/// Proposes a percentage of its received proposed size to `self`. | |
/// | |
/// This modifier multiplies the proposed size it receives from its parent | |
/// with the given factors for width and height. | |
/// | |
/// If the parent proposes `nil` or `.infinity` to us in any dimension, | |
/// we’ll forward these values to our child view unchanged. |
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
# Customise this file, documentation can be found here: | |
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs | |
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md | |
# can also be listed using the `fastlane actions` command | |
# Change the syntax highlighting to Ruby | |
# All lines starting with a # are ignored when running `fastlane` | |
# If you want to automatically update fastlane if a new version is available: | |
# update_fastlane |
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
/// Inspiration https://onmyway133.com/posts/how-to-make-tag-flow-layout-using-layout-protocol-in-swiftui/ | |
// swiftlint:disable:next file_types_order | |
public struct FlowLayout: Layout { | |
// inspired by https://onmyway133.com/posts/how-to-make-tag-flow-layout-using-layout-protocol-in-swiftui/ | |
private var horizontalSpacing: CGFloat | |
private var verticalSpacing: CGFloat | |
public init( | |
horizontalSpacing: CGFloat = 8, |