Skip to content

Instantly share code, notes, and snippets.

View Alesh17's full-sized avatar
🌖
Androthusiast

Metrier Alesh17

🌖
Androthusiast
View GitHub Profile
@Alesh17
Alesh17 / How to change git history.md
Last active April 23, 2024 09:57
Change a string in whole git history
  1. Setup git-filter-repo from https://github.com/newren/git-filter-repo
  2. Setup replace file with strings to replace and place it to your project root package: replaces.txt
password_1==>0001
password_2==>0002
password_3==>0003
  1. Replce your strings locally by do this command in your project path: git filter-repo --replace-text replaces.txt --force
fun quickSort(list: MutableList<Int>, min: Int = 0, max: Int = list.size - 1) {

    // завершить выполнение, если длина массива равна 0
    if (list.size == 0) return

    // завершить выполнение если уже нечего делить
    if (min >= max) return

 // выбрать опорный элемент
fun bubbleSort(list: MutableList<Int>) {
    do {
        var isSorted = true
        for (i in 1 until list.size) {
            if (list[i] < list[i - 1]) {
                val temp = list[i]
                list[i] = list[i - 1]
                list[i - 1] = temp
 isSorted = false
  • Stop Gradle Daemons + Delete cache directory + Delete build directory.

./gradlew --stop && rm -rf ~/.gradle/caches/build-cache/ && ./gradlew clean

  • If you don't have gradle wrapper - install it:

gradle wrapper

  1. Rename folder of project.
  2. Rename package [baseproject] in app module.
  3. Rename applicationId in config.gradle.
  4. Rename rootProject.name in settings.gradle. Tap sync.
  5. Rename package attribute in Manifest.
  6. Rename app name in strings.xml.
  7. Check tag in main_graph (of NavComponent) for any errors.
  8. Delete additional package (it contains materials (pic and etc) for the github).
  9. Delete Readme.md (if you need).