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 | |
| files_to_backup=(.env .db.env .fidi.env docker-compose.yml ) | |
| info() { echo -e "\\033[1;36m[INFO]\\033[0m \\033[36m$*\\033[0m" >&2; } | |
| warn() { echo -e "\\033[1;33m[WARNING]\\033[0m \\033[33m$*\\033[0m" >&2; } | |
| fatal() { echo -e "\\033[1;31m[FATAL]\\033[0m \\033[31m$*\\033[0m" >&2; exit 1; } | |
| intro () { | |
| echo " =====================================================" |
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/sh | |
| if test $# -lt 1; then | |
| echo "usage: current SERIAL" | |
| exit 1 | |
| fi | |
| adb -s "$1" shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp' |
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/sh | |
| if test $# -lt 1; then | |
| echo "usage: apk pattern target_directory" | |
| exit 1 | |
| fi | |
| DIR="${2:-$PWD}" | |
| for ENTRY in $(adb shell pm list packages -f | grep $1); do | |
| PACKAGE=$(echo $ENTRY | sed -n 's/package:\(.*\)=.*$/\1/p') | |
| NAME=$(echo $ENTRY | sed -n 's/^.*apk=\(.*\).*$/\1/p') |
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 io.ashdavies.playground | |
| import junit.framework.TestCase.assertEquals | |
| import org.junit.Assert.assertThrows | |
| import org.junit.Before | |
| import org.mockito.Mockito | |
| import org.mockito.kotlin.any | |
| import org.mockito.kotlin.doAnswer | |
| import org.mockito.kotlin.doReturn | |
| import org.mockito.kotlin.mock |
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
| > Task :app:compileDebugKotlinAndroid | |
| e: org.jetbrains.kotlin.util.KotlinFrontEndException: Exception while analyzing expression at (12,69) in ... | |
| Attachments: | |
| expression.kt | |
| { ... } | |
| at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.logOrThrowException(ExpressionTypingVisitorDispatcher.java:253) | |
| at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.lambda$getTypeInfo$0(ExpressionTypingVisitorDispatcher.java:224) | |
| at org.jetbrains.kotlin.util.PerformanceCounter.time(PerformanceCounter.kt:101) | |
| at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:164) |
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
| query Events { | |
| repository(owner: "...", name: "...") { | |
| events: object(expression: "HEAD:...") { | |
| ... on Tree { | |
| entries { | |
| data: object { | |
| ... on Blob { | |
| oid | |
| text | |
| } |
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
| class Activity : AppCompatActivity { | |
| private val navController: NavController by lazy(NONE) { findNavController(R.id.host) } | |
| private val viewModel: CoroutineViewModel by viewModels() | |
| fun onCreate(savedInstanceState: Bundle) { | |
| super.onCreate(savedInstanceState) | |
| viewModel | |
| .navDirections |
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/sh | |
| if test $# -lt 1; then | |
| echo "usage: apk pattern target_directory" | |
| exit 1 | |
| fi | |
| DIR="${2:-$PWD}" | |
| for ENTRY in $(adb shell pm list packages -f | grep $1); do | |
| PACKAGE=$(echo $ENTRY | sed -n 's/package:\(.*\)=.*$/\1/p') | |
| NAME=$(echo $ENTRY | sed -n 's/^.*apk=\(.*\).*$/\1/p') |
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/sh | |
| if [[ ${1:(-4)} != ".mp4" ]]; then | |
| echo "Invalid input file $1" | |
| exit 1 | |
| fi | |
| palette="${1%.*}-palette.png" | |
| filters="fps=25,scale=320:-1:flags=lanczos" |
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
| function dex-method-count() { | |
| cat $1 | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"' | |
| } | |
| function dex-method-count-by-package() { | |
| dir=$(mktemp -d -t dex) | |
| baksmali $1 -o $dir | |
| for pkg in `find $dir/* -type d`; do | |
| smali $pkg -o $pkg/classes.dex | |
| count=$(dex-method-count $pkg/classes.dex) | |
| name=$(echo ${pkg:(${#dir} + 1)} | tr '/' '.') |
NewerOlder