Skip to content

Instantly share code, notes, and snippets.

View trevjonez's full-sized avatar

Trevor Jones trevjonez

  • Aetna @ CVS Health
  • Texas
View GitHub Profile
@trevjonez
trevjonez / emulator_helpers.zsh
Created October 28, 2020 03:47
Android emulator helper functions
mkdir "$HOME/avd_logs"
function wait_for() {
name=$1
check_command=$2
i=0
while ! eval "$check_command"; do
(( i++ == 0 )) && printf %s "-- Waiting for $name ..." || printf '.'
sleep 1
if [ $i -gt $((5 * 60)) ] #5 minutes max spin time
@trevjonez
trevjonez / ActualUsecaseActivity.kt
Last active June 2, 2020 19:39
VM injection simplified example
class ActualUsecaseActivity: SomeActivityBaseClass(), ViewModelInjected<UsecaseViewModel> {
/* Live template to generate this property */
@Inject
lateinit var viewModelHolder: ViewModelHolder<UsecaseViewModel>
override fun onLifecycleStuffs() {
viewModel.statefulReactiveThing.subscribe { theState ->
viewProperty.text = theState.text
[...]
Initialized native services in: /Users/tjones/.gradle/native
The client will now receive all logging from the daemon (pid: 4850). The daemon log file: /Users/tjones/.gradle/daemon/5.2/daemon-4850.out.log
Starting 32nd build in daemon [uptime: 1 hrs 6 mins 39.312 secs, performance: 100%, no major garbage collections]
Using 8 worker leases.
Starting Build
Settings evaluated using settings file '/Users/tjones/SparseImageManager/settings.gradle.kts'.
Using local directory build cache for the root build (location = /Users/tjones/.gradle/caches/build-cache-1, removeUnusedEntriesAfter = 7 days).
Projects loaded. Root project using build file '/Users/tjones/SparseImageManager/build.gradle.kts'.
Included projects: [root project 'SparseImageManager']
{
"formatVersion": "0.4",
"component": {
"group": "com.trevjonez",
"module": "and-lib",
"version": "0.1.0",
"attributes": {
"org.gradle.status": "release"
}
},
{
"formatVersion": "0.4",
"component": {
"group": "com.trevjonez",
"module": "and-lib",
"version": "0.1.0",
"attributes": {
"org.gradle.status": "release"
}
},