Skip to content

Instantly share code, notes, and snippets.

View ArnoFrost's full-sized avatar
:octocat:
Compose ing...

ArnoFrost ArnoFrost

:octocat:
Compose ing...
View GitHub Profile
@ArnoFrost
ArnoFrost / migrate_bookmarks.sh
Last active April 8, 2025 11:43
migrate bookmarks when ide update
#!/bin/bash
# The user's home directory
USER_HOME=$HOME
# Define a function to display help information
show_help() {
echo "Usage information for the bookmark migration script"
echo "Usage: $0 [options]"
echo ""
echo "Options:"
@Pasha831
Pasha831 / ModalBottomSheet.kt
Created January 25, 2023 13:17
ModalBottomSheetLayout for Material 3 Jetpack Compose
package com.hse.parkingapp.ui.beta.screens.components.material3
/*
* Copyright 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@handstandsam
handstandsam / MyLifecycleOwner.kt
Last active June 26, 2025 11:10
Jetpack Compose OverlayService. You have to have all the correct permissions granted and in your manifest, but if you do, this this will show a green box with "Hello" in it!
import android.os.Bundle
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleRegistry
import androidx.savedstate.SavedStateRegistry
import androidx.savedstate.SavedStateRegistryController
import androidx.savedstate.SavedStateRegistryOwner
internal class MyLifecycleOwner : SavedStateRegistryOwner {
private var mLifecycleRegistry: LifecycleRegistry = LifecycleRegistry(this)
private var mSavedStateRegistryController: SavedStateRegistryController = SavedStateRegistryController.create(this)
private fun downloadWithFlow(dummy: DummyData) {
CoroutineScope(Dispatchers.IO).launch {
ktor.downloadFile(dummy.file, dummy.url).collect {
withContext(Dispatchers.Main) {
when (it) {
is DownloadResult.Success -> {
myAdapter.setDownloading(dummy, false)
}
is DownloadResult.Error -> {
myAdapter.setDownloading(dummy, false)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>log</string>
<string>logcat</string>
</array>
<key>firstLineMatch</key>