Skip to content

Instantly share code, notes, and snippets.

View Lutzifer's full-sized avatar

Wolfgang Lutz Lutzifer

View GitHub Profile
@Lutzifer
Lutzifer / .github_actions_selectXcode_action.yml
Created August 2, 2023 19:55
Automatically select Xcode based on files
name: "Select Xcode"
description: "Selects the version of xcode specified in this action"
runs:
using: "composite"
steps:
- name: set DEVELOPER_DIR to select Xcode
shell: bash
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
run: echo ::set-env name=DEVELOPER_DIR::$(/usr/bin/ruby Resources/selectXcode.rb PRINT .xcode-build)
@Lutzifer
Lutzifer / gist:8a987fce2f7e2dc786c7f55278afa77b
Created November 21, 2024 09:08
Setup Android Development Tools in your Shell when managing Android Studio using the Jetbrains Toolbox. Your terminal automatically uses the java sdk included in Android Studio then.
# Android
export PATH="$HOME/Library/Android/sdk/cmdline-tools/latest/bin:$HOME/Library/Android/sdk/platform-tools:$PATH"
export ANDROID_HOME=~/Library/Android/sdk
export JAVA_HOME=~/Applications/Android\ Studio.app/Contents/jbr/Contents/Home
alias aed="open -b com.google.android.studio" # Open current Folder in Android Studio: "aed ."
import io.reactivex.rxjava3.core.Observable
import timber.log.Timber
fun <T : Any> Observable<T>.debug(customTag: String? = null): Observable<T> {
val fileTag = Exception().stackTrace[0].fileName
val tag = if (customTag == null) fileTag else "$fileTag - $customTag"
val line = Exception().stackTrace[0].lineNumber
return this
.doOnNext { item ->
Timber.tag(tag).d("[LINE $line] Next item: $item")