<style name="TopSheet_DialogAnimation">
<item name="android:windowEnterAnimation">@anim/slide_out_from_top</item>
<item name="android:windowExitAnimation">@anim/slide_back_to_top</item>
</style>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You can whitelist files/folders with !, those will not be ignored. | |
# Everything that starts with a / are for root elements | |
# ignore | |
/custom_components/ | |
/zigbee2mqtt/log | |
/zigbee2mqtt/state.json | |
/home-assistant_v2.* # Exclude Home Assistant history-related database. Make sure to enable git LFS if you don't exclude that, since those files can go easily over 100MB | |
/home-assistant.log* | |
/.ssh/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A composable function that displays a text with a typewriter-like effect, revealing characters in chunks. | |
* | |
* @param text The input text to be displayed with the typewriter effect. | |
* @param minDelayInMillis The minimum delay in milliseconds between revealing character chunks, defaults to 10ms. | |
* @param maxDelayInMillis The maximum delay in milliseconds between revealing character chunks, defaults to 50ms. | |
* @param minCharacterChunk The minimum number of characters to reveal at once, defaults to 1. | |
* @param maxCharacterChunk The maximum number of characters to reveal at once, defaults to 5. | |
* @param onEffectCompleted A callback function invoked when the entire text has been revealed. | |
* @param displayTextComposable A composable function that receives the text to display with the typewriter effect. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> | |
<!-- not sure which one it is, so set both --> | |
<key>Ensemble</key> | |
<dict> | |
<key>Enabled</key> | |
<true/> | |
</dict> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import PlaygroundSupport | |
extension Double { | |
func toRadians() -> Double { | |
return self * Double.pi / 180 | |
} | |
func toCGFloat() -> CGFloat { | |
return CGFloat(self) |
Материалы к докладу на митап Redmadrobot 30 апреля.
Habr | YouTube | Презентация
- Merging vs. Rebasing - сравнение подходов с merge и rebase от Atlassian. У них вообще много хороших статей, очень советую.
- Why you should stop using Git rebase - какие сложности могут возникнуть, если чрезмерно увлечься rebase.
- Pro Git. Git Tools - Rewriting History - глава из книги Pro Git. Подробно описывается работа с interactive rebase. Про stash, patch, cherry-pick можно почитать там же.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Инфлейт ViewBinding заданного типа [T]. | |
* | |
* В качестве родителя используется [ViewGroup], по умолчанию view прикрепляется к корню родителя. | |
* **ВАЖНО!** Для инфлейта вьюх с `merge` в корне нужно использовать только этот метод. | |
*/ | |
inline fun <reified T : ViewBinding> ViewGroup.inflateViewBinding( | |
context: Context = this.context, | |
attachToRoot: Boolean = true | |
): T { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ViewModelFactory @Inject constructor( | |
private val providers: Map<Class<out ViewModel>, @JvmSuppressWildcards Provider<ViewModel>> | |
) : ViewModelProvider.Factory { | |
override fun <T : ViewModel> create(modelClass: Class<T>): T { | |
val provider = providers[modelClass] | |
?: providers.asIterable().find { modelClass.isAssignableFrom(it.key) }?.value | |
?: error("Unknown ViewModel class $modelClass") | |
return try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
struct Action { | |
let title: String | |
let style: UIAlertAction.Style | |
let action: () -> Void | |
} | |
extension Action { | |
static func `default`(_ title: String, action: @escaping () -> Void) -> [Action] { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.test.TestCoroutineDispatcher | |
import kotlinx.coroutines.test.TestCoroutineScope | |
import kotlinx.coroutines.test.resetMain | |
import kotlinx.coroutines.test.setMain | |
import org.junit.jupiter.api.extension.AfterAllCallback | |
import org.junit.jupiter.api.extension.AfterEachCallback | |
import org.junit.jupiter.api.extension.BeforeAllCallback | |
import org.junit.jupiter.api.extension.ExtendWith | |
import org.junit.jupiter.api.extension.ExtensionContext |
NewerOlder