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 Foundation | |
import SwiftUI | |
struct VGrid<Cell: View>: View { | |
struct CollectionRow<Cell: View>: View { | |
let indices: Range<Int> | |
let numberOfColumns: Int | |
let spacing: CGFloat |
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
git rev-parse --git-dir 1>/dev/null && git add -N . && git diff > "${HOME}/Desktop/$(basename $(git rev-parse --show-toplevel))_$(date '+%d-%m-%Y_%H-%M-%S').diff" |
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
{ | |
"name": "LTHPasscodeViewController", | |
"version": "3.8.5", | |
"license": { | |
"type": "MIT", | |
"file": "LICENSE.txt" | |
}, | |
"authors": { | |
"Roland Leth": "[email protected]" | |
}, |
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
// Following regex matches cyrillic characters in localization keys for NSLocalizedString | |
//--------------------------------------------------------------------------------------- | |
NSLocalizedString\(@"([\w\s\d]*?)([а-яА-Я]+)([\w\s\d]*?)" | |
//---------------------------------- | |
// Test cases | |
//---------------------------------- | |
NSLocalizedString(@"Notification", nil) | |
NSLocalizedString(@"Notificatio n ъ s df | |
", nil) |
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
// Vertical center in container | |
[superview addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[superview]-(<=1)-[view]" | |
options:NSLayoutFormatAlignAllCenterY | |
metrics:nil | |
views:viewDict]]; | |
// Horizontal center in container | |
[superview addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[superview]-(<=1)-[view]" | |
options:NSLayoutFormatAlignAllCenterX | |
metrics:nil |