Skip to content

Instantly share code, notes, and snippets.

@audiserg
audiserg / docker_rus.md
Created April 6, 2025 14:12 — forked from wtw24/docker_rus.md
Шпаргалка с командами Docker

Шпаргалка с командами Docker

1552317264965 1552317537397 1552317711879

1552318467562 1552318531067 1552318577900 1552318614839

10 01;setDefaultSession
10 02;setProgrammingSession
10 03;setExtendedDiagnosticSession
11 01;hardReset
14 FF FF FF,31 01 0F 06,31 01 40 00 00,31 01 40 00 05,31 01 40 00 01;Clear all DTCs (clear DTC,clear Infospeicher,ZFS ***8211; DM_Lock,clear ZFS ***8211; DM_Clear,ZFS ***8211; DM_Unlock)
14 FF FF FF;Clear DTC
19 02 0C;ReadDTC(0C)
19 0A;ReadSupportedDTC
22 10 0A;readEnergyMode
22 10 0E;readExtendedMode
@audiserg
audiserg / smali-cheatsheet.md
Created January 29, 2025 14:50 — forked from LionZXY/smali-cheatsheet.md
Smali docs на русском. Теперь в Markdown

Русская шпаргалка по Smali

Приветствую, любители реверс-инжинирить Android. Перед вами шпаргалка по Smali - аналогу ассемблера для Android-приложений.

Изначальный текст на русском взят отсюда. Там текст появился из машинного перевода официальной документации.

В итоге, оформил сухой текст + поправил небольшие опечатки и корявости перевода. По поводу замечаний и предложений можете писать либо мне в ЛС, либо оформлять PR на Gist.

Общая информация

Виды(Types)

@audiserg
audiserg / pubspec_base_sync.py
Created June 6, 2023 18:25 — forked from fabriciovergara/pubspec_base_sync.py
Flutter: Sync pubspec file in melos project with flavors
import sys
import glob
import ruamel.yaml
yaml = ruamel.yaml.YAML()
def main():
# python3 pubspec_base_sync.py ../pubspec_base_android.yaml ../pubspec_base_android_huawei.yaml
@audiserg
audiserg / do_notation_future.dart
Created January 23, 2023 06:23 — forked from nythrox/do_notation_future.dart
Dart await/async using Future and do notation
main() {
final value = async(() {
final num1 = await(Future.value(5));
final num2 = await(Future.value(2));
return num1 * num2;
});
value.then(print).catchError(print);
async(() {
[1,2,3,4,5].forEach((i) {
@audiserg
audiserg / do_notation.dart
Created January 23, 2023 06:23 — forked from nythrox/do_notation.dart
Flutter/Dart do notation
main() {
// Either<dynamic, int> result
final result = Either.Do(() {
final num1 = perform(Right(5));
final num2 = perform(Right(2));
return num1 * num2;
});
print(result.value); // 10
// Option<int> result2
final result2 = Option.Do(() {
@audiserg
audiserg / pattern_matching.dart
Created January 23, 2023 06:21 — forked from nythrox/pattern_matching.dart
Flutter/Dart pattern matching
void main() {
Greeting message = Hi();
final result = match(message, {
on((Hi hi) => "hello, ${hi.name}"),
on((Bye bye) => "bye, see you at ${bye.seeYouAgain}"),
otherwise(() => throw Error()),
});
print(result);
@audiserg
audiserg / DashedBorder.kt
Created July 19, 2022 13:06 — forked from DavidIbrahim/DashedBorder.kt
dashedBorder modifier for android compose
import androidx.compose.foundation.BorderStroke
/*
* 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
@audiserg
audiserg / Mapper.kt
Last active February 17, 2022 10:40
Mapper interface
interface Mapper<K, T> {
fun map(entity: K): T
fun map(list: List<K>): List<T> = list.map(this::map)
}
interface Mapped
//For objects implemented Mapped
fun <T:Mapped, K> List<T>.map(mapper: Mapper<T, K>): List<K> = this.map(mapper::map)
fun <T:Mapped, K> T.map(mapper: Mapper<T, K>) = mapper.map(this)
//For Any objects
@audiserg
audiserg / Snackbars.kt
Created August 17, 2021 12:26 — forked from RankoR/Snackbars.kt
Extend Espresso to make Snackbar testing easier. Note: this code works only for AndroidX.
import androidx.annotation.StringRes
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.ViewInteraction
import androidx.test.espresso.matcher.ViewMatchers
import org.hamcrest.CoreMatchers
import org.hamcrest.CoreMatchers.allOf
fun onSnackbar(@StringRes withText: Int): ViewInteraction {
return onView(
CoreMatchers.allOf(