Skip to content

Instantly share code, notes, and snippets.

View Nikoloutsos's full-sized avatar

Konstantinos Nikoloutsos Nikoloutsos

  • Athens, Greece
View GitHub Profile
@Nikoloutsos
Nikoloutsos / DeleteSnapshotsFolders.sh
Created November 29, 2023 10:46
Delete all snapshots command
find . -type d -name '__Snapshots__' -exec rm -rf {} +
@Nikoloutsos
Nikoloutsos / FontPrint.swift
Created November 28, 2023 23:06
Print all registered fonts (Debugging)
func printMyFonts() {
print("--------- Available Font names ----------")
for name in UIFont.familyNames() {
print(name)
if let nameString = name as? String {
print(UIFont.fontNamesForFamilyName(nameString))
}
}
}
@Nikoloutsos
Nikoloutsos / delete_dotbuild_directories
Created November 16, 2023 15:28
delete all .build from spms
#!/bin/bash
# Author: Konstantinos Nikoloutsos
# Delete all .build files from SPMs
spms_path="./SwiftPackages"
for dir in "$spms_path"/*/; do
echo "Deleting: $dir/.build"
rm -rf "$dir/.build"
done
@Nikoloutsos
Nikoloutsos / update_all_spm.sh
Created November 16, 2023 12:05
Update all spm packages
#!/bin/bash
# Author: Konstantinos Nikoloutsos
# Specify the directory where your packages are organized inside
search_directory="."
echo "This script will iteratively update all dependencies in SPM Packages"
echo "❗️XCode will be forced quit & DerivedData will be cleaned if you continue.."
echo "(By doing that we guarantee that will not be any caches/conflicts with XCode)"
@Nikoloutsos
Nikoloutsos / .sourcery.yml
Created May 26, 2022 13:30
configuration with spm
# READ MORE ABOUT configuration here https://merowing.info/Sourcery/usage.html
configurations:
# -- Blueground configuration --
- sources:
include:
- FooApp
templates:
- Sourcery
output:
path: BluegroundTests/Sourcery
@Nikoloutsos
Nikoloutsos / .sourcery.yml
Created May 26, 2022 13:05
Example foo yml for sourcery
# READ MORE ABOUT configuration here https://merowing.info/Sourcery/usage.html
configurations:
# -- Blueground configuration --
- sources:
include:
- FooApp
templates:
- Sourcery
output:
path: BluegroundTests/Sourcery
# READ MORE ABOUT configuration here https://merowing.info/Sourcery/usage.html
configurations:
# -- Blueground configuration --
- sources:
- Blueground
- SwiftPackages
- Pods
- SwiftPackages/Sourcery/Sources/Sourcery/helpers/AutoFixturableConfiguration
templates:
- SwiftPackages/Sourcery/Sources/Sourcery/Templates
// Generated using Sourcery 1.8.1 — https://github.com/krzysztofzablocki/Sourcery
// DO NOT EDIT
// 💙💙 Autogenerated for saving Beegees time ⏰
// swiftlint:disable all
@testable import
import Foundation
extension Human {
static func fixtures(
// sourcery: AutoFixturable
struct Human {
// sourcery: example = ""The fixture will have this string as default value""
let firstName: String
let lastName: String
let fatherName: String
let motherName: String
// sourcery: example = ".init()"
let address: Location
let age: Int
func test_HumanAgeEligible {
// Given
let human = Human.fixtures(age: 14)
// When
let result = service.hasEligibleAge()
XCTAssertFalse(result)
}