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 CounterActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContent { | |
MaterialTheme { | |
val countStatus = +state { 0 } | |
val liveCount = MutableLiveData<Int>().apply { | |
value = 0 |
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 io.kotlintest.runner.junit4.KotlinTestRunner | |
import io.kotlintest.specs.AbstractDescribeSpec | |
import org.junit.runner.RunWith | |
import java.util.function.Consumer | |
import java.util.function.Function | |
@RunWith(KotlinTestRunner::class) | |
abstract class DescribeSpec4JKt : AbstractDescribeSpec() { | |
var currentScope: DescribeScope? = null |
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
# elm-package generated files | |
elm-stuff/ | |
# elm-repl generated files | |
repl-temp-* | |
elm.js | |
.DS_Store |
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
.zshrc |
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
# .config/fish/conf.d/omf.fish | |
# Path to Oh My Fish install. | |
set -q XDG_DATA_HOME | |
and set -gx OMF_PATH "$XDG_DATA_HOME/omf" | |
or set -gx OMF_PATH "$HOME/.local/share/omf" | |
# Load Oh My Fish configuration. | |
source $OMF_PATH/init.fish | |
# set up java with jenv |
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
adb shell getevent -lt 2>&1 | tee "$(date +"%Y_%m_%d_%I_%M_%p").log" |
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 fun getRootWindowPackageName(): String? = | |
InstrumentationRegistry | |
.getInstrumentation() | |
.uiAutomation | |
.rootInActiveWindow | |
?.packageName | |
?.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
class MainActivity : AppCompatActivity() { | |
val mainViewModel: MainViewModel by lazy { | |
ViewModelProviders.of(this).get(MainViewModel::class.java) | |
} | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_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
class ExplodeFadeOut : Explode() { | |
init { | |
propagation = null | |
} | |
override fun onAppear(sceneRoot: ViewGroup?, view: View?, startValues: TransitionValues?, | |
endValues: TransitionValues?): Animator { | |
val explodeAnimator = super.onAppear(sceneRoot, view, startValues, endValues) | |
val fadeInAnimator = ObjectAnimator.ofFloat(view, View.ALPHA, 0f, 1f) |
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 InputConfirmViewModel : ViewModel() { | |
// inputs | |
val inputStream = MutableLiveData<String>() | |
val inputClickBtn = MutableLiveData<Unit?>().apply { observeForever { | |
errorEventStream.value = | |
if(inputStream.value.isIntNum()) null else "not num" | |
} } | |
// outputs | |
val btnEnableStream = MediatorLiveData<Boolean>().apply { value = false }.also { enable -> | |
enable.addSource(inputStream) { ins: String -> |