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 com.tp.theah64.orchid.utils.extensions | |
import android.util.Log | |
fun Any.debug(message: String) { | |
Log.d(getTag(this), message) | |
} | |
fun Any.info(message: String) { | |
Log.i(getTag(this), message) |
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
interface Car { | |
fun carMethod(); | |
} | |
interface Bus { | |
fun busMethod(); | |
} | |
class Leyland : Bus { | |
override fun busMethod() { |
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.content.Context | |
import android.graphics.* | |
import android.util.AttributeSet | |
import android.view.View | |
class DonutView(context: Context?, attrs: AttributeSet?) : View(context, attrs) { | |
private val icingPathEffect = ComposePathEffect( | |
CornerPathEffect(50f), | |
DiscretePathEffect(80f, 50f) |
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
object Calculator { | |
fun divide(a: Int, b: Int): Int { | |
return a / b | |
} | |
} | |
@RunWith(Parameterized::class) | |
class ParameterizedTest( | |
private val num1: Int, | |
private val num2: Int, |
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 com.theapache64.mockitosample | |
import androidx.test.core.app.ActivityScenario | |
import androidx.test.ext.junit.runners.AndroidJUnit4 | |
import org.junit.Assert.assertEquals | |
import org.junit.Before | |
import org.junit.Test | |
import org.junit.runner.RunWith | |
import org.mockito.Mock | |
import org.mockito.MockitoAnnotations |
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 pull_file(){ | |
filePath=$(adb shell find /storage/emulated/0 -iname "*$1*" | tr -d '\r' | xargs -n1) | |
x=$(echo "$filePath" | tr '\n' ' ' | xargs) | |
adb pull "$x" | |
} |
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
π Initializing auto-motion ... | |
π Analyzing audio stream... | |
βοΈ Audio analysis finishednition: 100% |###########################| Time: 0:05:19 | |
π₯ Analyzing video stream... | |
βοΈ Video analysis finished | |
πΈ Analyzing BGM... | |
βοΈβοΈβοΈβοΈβοΈβοΈβοΈβοΈβοΈβοΈβοΈβοΈβοΈβοΈβοΈβοΈβοΈβοΈβοΈβοΈ | |
βͺ Total BGM duration : 00:12:07 | |
βͺ Passed BGM duration : 00:03:41 | |
β Remaining BGM needed : 00:08:26 |
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 animOff(){ | |
adb shell settings put global window_animation_scale 0 & | |
adb shell settings put global transition_animation_scale 0 & | |
adb shell settings put global animator_duration_scale 0 | |
} | |
function animOn(){ | |
adb shell settings put global window_animation_scale 1 & | |
adb shell settings put global transition_animation_scale 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
function mvvmize () { | |
# to hold local data source classes such as room,sqlite,realm etc. | |
mkdir -p data/local && | |
# to hold remote data source such as Retrofit, OkHttp etc | |
mkdir -p data/remote && | |
# to hold repository classes that will manage both local and remote data sources | |
mkdir -p data/repositories && |
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 git-ls { | |
# tree respecting gitignore | |
local ignored=$(git ls-files -ci --others --directory --exclude-standard) | |
local ignored_filter=$(echo "$ignored" \ | |
| egrep -v "^#.*$|^[[:space:]]*$" \ | |
| sed 's~^/~~' \ | |
| sed 's~/$~~' \ | |
| tr "\\n" "|") | |
tree --prune -I ".git|${ignored_filter: : -1}" "$@" | |
} |