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
#!/usr/bin/env python3 | |
import os | |
import re | |
import string | |
def to_camel_case(snake_str): | |
components = snake_str.split('_') | |
return components[0] + ''.join(string.capwords(x) for x in components[1:]) |
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
// | |
// File.swift | |
// SP | |
// | |
// Created by Yevgen Sagidulin on 12.06.2022. | |
// | |
import Foundation | |
protocol AnimalFeed { |
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
@resultBuilder | |
enum ArrayBuilder<OutputModel> { | |
static func buildEither(first component: [OutputModel]) -> [OutputModel] { | |
return component | |
} | |
static func buildEither(second component: [OutputModel]) -> [OutputModel] { | |
return component | |
} |
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
{ | |
"rules": { | |
"users" : { | |
"$user_id" : { | |
".read" : "auth != null && $user_id === auth.uid", | |
".write" : "auth != null && $user_id === auth.uid" | |
} | |
} | |
} | |
} |
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
struct KeychainItem { | |
// MARK: Nested Types | |
enum KeychainError: Error { | |
case noPassword | |
case unexpectedPasswordData | |
case unexpectedItemData | |
case unhandledError(status: OSStatus) | |
} |
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 remote add <other-fork-alias> <other-fork-URL> | |
git checkout <branch> | |
git fetch <other-fork-alias> | |
git cherry-pick <commit-hash> | |
git push <your-fork-alias> | |
git remote remove <other-fork-alias> | |
git remote -v |
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
// This prints a list of buttons that on tap will fire a different type of haptic vibration | |
import SwiftUI | |
struct ContentView: View { | |
let generator = UINotificationFeedbackGenerator() | |
var body: some View { | |
VStack(alignment: .center, spacing: 30.0) { | |
Button(action: { |
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
localeIdentifier | Description | |
---|---|---|
eu | Basque | |
hr_BA | Croatian (Bosnia & Herzegovina) | |
en_CM | English (Cameroon) | |
en_BI | English (Burundi) | |
rw_RW | Kinyarwanda (Rwanda) | |
ast | Asturian | |
en_SZ | English (Swaziland) | |
he_IL | Hebrew (Israel) | |
ar | Arabic |
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 UIKit | |
extension UIView { | |
func blurView(style: UIBlurEffect.Style) { | |
var blurEffectView = UIVisualEffectView() | |
let blurEffect = UIBlurEffect(style: style) | |
blurEffectView = UIVisualEffectView(effect: blurEffect) | |
blurEffectView.frame = bounds | |
addSubview(blurEffectView) | |
} |
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 checkout <branch> | |
git fetch <other-fork-alias> | |
git cherry-pick <commit-hash> | |
git push <your-fork-alias> |
NewerOlder