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
private static String inputStreamToString(final InputStream is) throws IOException { | |
final InputStreamReader ir = new InputStreamReader(is, "UTF-8"); | |
final StringBuilder sb = new StringBuilder(); | |
final char[] buf = new char[1024]; | |
int n; | |
while ((n = ir.read(buf)) != -1) { | |
sb.append(buf, 0, n); | |
} | |
return sb.toString(); | |
} |
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
#!/usr/bin/env bash | |
set -x | |
set -e | |
usage() { | |
echo "Usage: $0 <output name> <git repo path>" | |
exit 1 | |
} | |
[[ $# -eq 2 ]] || { |
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
#!/usr/bin/env bash | |
set -xe # Log everything, abort if anything fails | |
# Simple script to unzip Android Archive libraries (AAR files) | |
usage() { | |
echo "Usage: $0 <aar file>" | |
exit 1 | |
} |
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
#!/usr/bin/python | |
import sys | |
def read_file(f): | |
print(f.read()) | |
def main(): |
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
macOS Android Studio JDK: | |
export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home" | |
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 | |
set -e | |
set -x | |
# It would be painful to repeat credentials every time. | |
# This should store them to ~/.git-credentials | |
git config --global credential.helper store | |
# Default merge | |
git config --global pull.rebase false |
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 os | |
import subprocess | |
def sh(cmd): | |
print('sh: ' + cmd) | |
ret = subprocess.run(cmd, shell=True, env=os.environ, executable='/bin/bash') | |
if ret.returncode != 0: | |
exit(ret.returncode) | |
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 android.util.Log | |
import androidx.test.espresso.Espresso | |
import org.junit.Assert | |
import timber.log.Timber | |
/** | |
* During UI tests, we want to fail the test immediately if any "non-fatal error" happens. | |
* The purpose of non-fatal errors is to inform as about production failures without crashing the entire app. | |
*/ | |
object NonFatalAbortTree: Timber.Tree() { |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es2018", | |
"lib": [ | |
"es6", | |
"dom", | |
"dom.iterable", | |
"esnext", | |
"es2018" | |
], |
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
module.exports = { | |
extends: [ | |
"react-app", | |
"plugin:@typescript-eslint/recommended", | |
"prettier/@typescript-eslint", | |
"plugin:prettier/recommended", | |
"prettier/react", | |
], | |
plugins: [ | |
"simple-import-sort" |
OlderNewer