Skip to content

Instantly share code, notes, and snippets.

View byaruhaf's full-sized avatar
🏄
Surfing Xcode

Franklin Byaruhanga byaruhaf

🏄
Surfing Xcode
View GitHub Profile
@byaruhaf
byaruhaf / .dockerignore
Created February 6, 2025 20:57
python .dockerignore
__pycache__
*.pyc
*.pyo
*.pyd
.Python
env
pip-log.txt
pip-delete-this-directory.txt
.tox
.coverage
@byaruhaf
byaruhaf / Git Conventional Commits Guide.md
Created January 13, 2025 18:21
Git Conventional Commits Guide

Git Conventional Commits Guide

Basic Commands

Each commit type has a dedicated shortcut command. Here are the basic patterns:

git feat "your message"    # New features
git fix "your message"     # Bug fixes
git docs "your message"    # Documentation changes
@byaruhaf
byaruhaf / PurchaseManager.swift
Created October 30, 2024 11:15 — forked from lienmt/PurchaseManager.swift
PurchaseManager with SwiftUI & StoreKit
import Foundation
import StoreKit
enum ProductsId: String {
case subsWeekly24 = "WeeklyId"
case subsAnnual24 = "AnnualId"
}
@MainActor
class PurchaseManager: NSObject, ObservableObject {
@byaruhaf
byaruhaf / Extension+Logger.swift
Created October 4, 2024 21:07 — forked from bobdel/Extension+Logger.swift
General purpose global logging and signpost configuration file
//
// Extension+Logger.swift
//
// Created by Robert DeLaurentis on 3/13/24.
// Last Modified on 10/4/24.
///**
/// General purpose global logging and signpost configuration
/// file tested on Xcode 16 and iOS 18 with
/// Swift 6 toolchain and strict concurrency
@byaruhaf
byaruhaf / RequestState.kt
Created March 17, 2024 05:32 — forked from stevdza-san/RequestState.kt
Useful wrapper class for handling the data in Jetpack Compose
import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.core.tween
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.togetherWith
import androidx.compose.runtime.Composable
sealed class RequestState<out T> {
data object Idle : RequestState<Nothing>()
data object Loading : RequestState<Nothing>()
@byaruhaf
byaruhaf / Terminal Output
Created September 30, 2023 20:15
lint collection.json
❯ redocly lint collection.json [23:11:38]
No configurations were provided -- using built in recommended configuration by default.
validating collection.json...
[1] collection.json:1778:9 at #/paths/~1v2_0~1invoice~1{referenceId}
The path already exists which differs only by path parameter name(s): `/v2_0/invoice/{x-referenceId}` and `/v2_0/invoice/{referenceId}`.
1776 | }
1777 | },
struct ContentView: View {
@State private var isPresented = false
var body: some View {
Button("Present!") {
isPresented.toggle()
}
.fullScreenCover(isPresented: $isPresented, content: FullScreenView.init)
}
}
import SwiftUI
struct FullScreenView: View {
@Environment(\.dismiss) var dismiss
@State private var name = "Taylor"
var body: some View {
ZStack {
Color.primary.edgesIgnoringSafeArea(.all)
VStack {
@byaruhaf
byaruhaf / PhotosGridViewDraggableX.swift
Last active November 3, 2023 23:19
PhotosGridViewDraggableX
//
// ContentView.swift
// TestDrag
//
// Created by Franklin Byaruhanga on 23/09/2023.
//
import SwiftUI
struct ColorItemView: View {
@byaruhaf
byaruhaf / libs.versions.toml
Created September 16, 2023 16:16 — forked from BobbyESP/libs.versions.toml
A very complete TOML file for Android Development mainly thought for the new Jetpack Compose framework
[versions]
accompanist = "0.29.2-rc"
androidGradlePlugin = "7.4.2"
androidxComposeBom = "2023.01.00"
androidxComposeCompiler = "1.4.6"
androidxCore = "1.10.0-rc01"
androidMaterial = "1.9.0-alpha02"
androidxAppCompat = "1.7.0-alpha02"
androidxActivity = "1.7.1"
markdownDependency = "0.3.2"