Skip to content

Instantly share code, notes, and snippets.

View D-Antonelli's full-sized avatar
🏠
Working from home

Derya A. Antonelli D-Antonelli

🏠
Working from home
  • Boon & Moil
  • England
  • 15:06 (UTC +01:00)
View GitHub Profile
@D-Antonelli
D-Antonelli / languages.json
Created February 29, 2024 16:30
ISO 639-1 Alpha-2 language codes
[
{
"code": "aa",
"name": "Afar"
},
{
"code": "ab",
"name": "Abkhazian"
},
{
@D-Antonelli
D-Antonelli / gist:f3f9641b85fc04e64102e58f0e56dfcc
Created January 29, 2024 10:21
Xcode Source Control Cheat Sheet
+-----------------------------------------------------------------------------+
| Xcode Source Control Cheat Sheet |
+-----------------------------------------------------------------------------+
| [Setup & Clone] |
| 📦 Clone Repository: Intergate -> Clone |
| 🔗 Add Existing Remote: Source Control Navigator -> Repositories -> |
| -> Remotes -> Add Existing Remote |
+-----------------------------------------------------------------------------+
| [Working with Changes] |
| 📝 Commit Changes: Source Control Navigator -> your branch -> |
import Foundation
extension Bundle {
func decode<T: Decodable>(_ file: String) -> T {
guard let url = self.url(forResource: file, withExtension: nil) else {
fatalError("Failed to locate \(file) in bundle")
}
guard let data = try? Data(contentsOf: url) else {
fatalError("Failed to load \(file) in bundle")