Skip to content

Instantly share code, notes, and snippets.

@egabor
egabor / .rswiftignore
Last active February 19, 2022 20:06
This is used when R.swift and SwiftGen used in the project. R.swift is used for localization only SwiftGen is for every other resources.
**/*.xcassets
**/*.ttf
@egabor
egabor / Podfile
Last active February 19, 2022 20:07
[IMAGE] Snippets for Xcode for generating strongly typed image resources. [SwiftGen 6.0]
pod 'SwiftGen', '~> 6.0'
@egabor
egabor / Podfile
Last active February 19, 2022 20:07
[COLOR] Snippets for Xcode for generating strongly typed color resources. [SwiftGen 6.0]
pod 'SwiftGen', '~> 6.0'
@egabor
egabor / Podfile
Last active February 19, 2022 20:07
[FONT] Snippets for Xcode for generating strongly typed font resources. [SwiftGen 6.0]
pod 'SwiftGen', '~> 6.0'
@egabor
egabor / .swiftlint.yml
Last active February 19, 2022 20:07
SwiftLint Configuration File.
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Pods
- R.generated.swift
- <#ProjectName#>Tests
- <#ProjectName#>UITests
identifier_name:
excluded:
- r
- id
@egabor
egabor / DependencyProvider.swift
Created February 14, 2022 20:37
Dependency Injection snippets. [Swinject]
import Foundation
import Swinject
class DependencyProvider {
static let shared = DependencyProvider()
private let container = Container()
let assembler: Assembler
@egabor
egabor / Config.swift
Last active February 14, 2022 20:57
General App Configuration File
import Foundation
import Logging
enum ConfigKey: String {
case bundleId = "BUNDLE_ID"
case appName = "APP_NAME"
case baseUrl = "BASE_URL"
case apiSecret = "API_SECRET"
case appVersion = "CFBundleShortVersionString"
case appBuild = "CFBundleVersion"
@egabor
egabor / api_call_with_request_body.swift
Last active February 20, 2022 10:48
Swift networking snippets (await/async)
public func <#functionName#>(data: <#RequestType#>) async throws -> <#ReponseType#> {
let request = NetworkRequest(baseUrl, "<#endpointPath#>", .<#httpMethod#>, headers, body: convertToData(data: data))
return try await buildRequest(with: request)
}
#!/bin/bash
echo " "
echo " "
echo " "
# System Upgrade
echo "----------------------------------------------------------------"
echo "Commence System Upgrade"
echo "----------------------------------------------------------------"
sudo apt-get update && sudo apt-get upgrade -y