Skip to content

Instantly share code, notes, and snippets.

View kibotu's full-sized avatar
🎯
Focusing

Jan Rabe kibotu

🎯
Focusing
View GitHub Profile
@kibotu
kibotu / authenticator.gradle
Created January 19, 2026 12:24
Gradle Authenticator
if (!project.hasProperty('artifactory_contextUrl')) throw new GradleException('the "artifactory_contextUrl" needs to be set in gradle.properties!')
if (!project.hasProperty('artifactory_token')) throw new GradleException('the "artifactory_token" needs to be set in gradle.properties!')
if (!project.hasProperty('artifactory_reader_1')) throw new GradleException('the "artifactory_reader_1" needs to be set in gradle.properties!')
if (!project.hasProperty('artifactory_reader_2')) throw new GradleException('the "artifactory_reader_2" needs to be set in gradle.properties!')
if (!project.hasProperty('artifactory_reader_3')) throw new GradleException('the "artifactory_reader_3" needs to be set in gradle.properties!')
if (!project.hasProperty('artifactory_reader_token_1')) throw new GradleException('the "artifactory_reader_token_1" needs to be set in gradle.properties!')
if (!project.hasProperty('artifactory_reader_token_2')) throw new GradleException('the "artifactory_reader_token_2" needs to be set in gradle.properti
@kibotu
kibotu / version-overrides.gradle
Last active January 14, 2026 17:28
Task to analyze dependencies and output necessary version overrides Similar to version-overrides/generate.py - finds actual duplicate versions
tasks.register("logVersionOverrides") {
group = "help"
description = "Analyzes dependencies for actual version conflicts (same dep with multiple versions)"
doLast {
// Track all versions seen for each dependency
def depVersions = [:]
def resolvedVersions = [:]
// Analyze releaseRuntimeClasspath configuration
@kibotu
kibotu / print-java-version-project.gradle
Last active January 19, 2026 10:35
Print Java Version for Kotlin and Java Compiler
/**
* Gradle task that prints comprehensive Java and Kotlin version information for Android modules.
*
* This task displays:
* - Java runtime version, vendor, and home directory
* - Gradle version
* - Java source and target compatibility settings
* - Kotlin JVM target version (if configured)
* - Kotlin plugin version
*
@kibotu
kibotu / ssh.sh
Created January 7, 2026 08:48
ssh connect with specific ssh key
ssh -i ~/.ssh/id_rsa -o IdentitiesOnly=yes pi@192.168.0.1
@kibotu
kibotu / mermaid.yml
Created December 16, 2025 10:31
Git Flow: App
---
config:
gitGraph:
mainBranchName: main
rotateCommitLabel: true
theme: base
---
gitGraph
commit id: "init"
branch release/2026.1.0
@kibotu
kibotu / benchmark-config-caching-detailed.sh
Last active November 25, 2025 15:19
Configuration cache benchmark
#!/bin/bash
# Enhanced Configuration Cache Benchmark with Diagnostics
# This version provides detailed insights into cache behavior
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
@kibotu
kibotu / KEYBOARD_AVOIDANCE.md
Last active October 30, 2025 09:26
SwiftUI & UIKit Keyboard Avoidance fix for iOS 26.0.1, 26.1

Keyboard Avoidance Implementation

Overview

This document describes the keyboard avoidance implementation for the Messenger iOS app, ensuring that the ChatInputView is not overlapped by the keyboard on iOS 16+ (including iOS 16.0.1 and 16.1).

Problem

The SwiftUI-based ChatInputView was not properly avoiding the keyboard when it appeared, potentially causing the input field to be hidden behind the keyboard.

Solution

@kibotu
kibotu / ViewControllerFocusMonitoring.md
Last active October 17, 2025 10:48
onWindowsFocusChanged for iOS

View Controller Focus Monitoring Pattern

Overview

This document describes a pragmatic solution for monitoring focus changes in iOS view controllers. The pattern allows view controllers to be notified when they gain or lose user attention due to various system events like modals, alerts, app backgrounding, or navigation changes.

Problem Statement

iOS view controllers need to react to focus changes, but the platform doesn't provide a built-in unified API for this. A view controller may lose focus in several ways:

@kibotu
kibotu / android-run-maestro-jenkins-groovy-function.groovy
Last active October 13, 2025 12:21
Running maesto ui tests on headless android emulator on mac or linux in parallel.
/**
* runMaestro("signin-flow.yaml", "36", "app/build/outputs/apk/debug/app-debug.apk", "de.example")
*/
def runMaestro(flow, api, apk, bundleIdentifier) {
int rc = sh(
script: "./build/buildscripts/run-headless-maestro-tests.sh ${flow} ${apk} ${api}",
returnStatus: true
)
@kibotu
kibotu / check_dagger_consistency.py
Last active August 18, 2025 10:07
Check if there is a @Inject constructor without a provide function being used.
#!/usr/bin/env python3
import os
import re
import sys
from pathlib import Path
from typing import Set, List, Tuple
from dataclasses import dataclass
@dataclass
class InjectClass: