This file contains hidden or 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 argparse | |
| import base64 | |
| import json | |
| import itertools | |
| import sys | |
| import irgen | |
| import heatshrink2 | |
| from construct import ( |
This file contains hidden or 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
| package ru.yandex.taxi.widget.recycler; | |
| import androidx.annotation.NonNull; | |
| import androidx.recyclerview.widget.RecyclerView; | |
| public class RecyclerViewFlingFixer extends RecyclerView.OnFlingListener { | |
| public static void addFlingFixer(@NonNull RecyclerView recyclerView) { | |
| RecyclerViewFlingFixer flingFixer = new RecyclerViewFlingFixer(); | |
| recyclerView.setOnFlingListener(flingFixer); |
This file contains hidden or 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
| #!/bin/bash -x | |
| # This script will convert all your git submodules into git subtrees. | |
| # This script ensures that your new subtrees point to the same commits as the | |
| # old submodules did, unlike most other scripts that do this. | |
| # THIS SCRIPT MUST BE PLACED OUTSIDE OF YOUR REPOSITORY!!!!!!!!!! | |
| # Otherwise, the script will interfere with the git commits (unless you add it to .gitignore). | |
| # Save the script in your home directory as `~/subtrees.sh` | |
| # `cd` into your repository | |
| # Run `~/subtrees.sh` | |
| # Enjoy! |
This file contains hidden or 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
| inline fun <R, T1, T2> ifAllNonNull(item1: T1?, item2: T2?, block: (T1, T2) -> R) | |
| = if (item1 != null && item2 != null) block(item1, item2) else null | |
| inline fun <R, T1, T2, T3> ifAllNonNull(item1: T1?, item2: T2?, item3: T3?, block: (T1, T2, T3) -> R) | |
| = if (item1 != null && item2 != null && item3 != null) block(item1, item2, item3) else null | |
| inline fun <R, T1, T2, T3, T4> ifAllNonNull(item1: T1?, item2: T2?, item3: T3?, item4: T4?, block: (T1, T2, T3, T4) -> R) | |
| = if (item1 != null && item2 != null && item3 != null && item4 != null) block(item1, item2, item3, item4) else null | |