Skip to content

Instantly share code, notes, and snippets.

View robotsquidward's full-sized avatar
☺️
alive and happy

A.J. Kueterman robotsquidward

☺️
alive and happy
View GitHub Profile
@robotsquidward
robotsquidward / amidst-the-ancient-trees.md
Created March 26, 2021 17:04
Amidst the Ancient Trees

Amidst the Ancient Trees

Session 1 - 8/8/2018 Notes

The basic situation

Your characters (the Priest, the Mortician, the Criminal, and the Private Eye) are visiting the small, isolated town of Bennington, Vermont. (Sorry, I didn't remember the character names.)

While passing through the area, your characters have become aware of a certain situation which has placed a teenage girl in dire peril. Jane Strong, the daughter of local business magnate Lucas Strong, has been kidnapped and held for ransom. Being compassionate, good men at heart, you've all decided to pitch in and join the posse which will hunt down her kidnappers, the villianous Sidney Harris and his gang.

Podcast Ideas

These are podcast ideas / topics that I'd be interested and mildly-qualified to host or guest appear on. If you've got a podcast and you talk about something on this list, hit me up @ajkueterman.

Shows

Most likely, I'd love to make a show that can be some combination of all of the topics / show concepts I love.

  • Xbox Game Pass - we pick a different game every week or two on Xbox Game Pass, play and discuss.
  • Software/Hardware talk - talk about building software and the hardware we obsess over
private val model: MyViewModel by activityViewModelBuilder {
MyViewModel(repo = MyRepository())
}
private val model: MyViewModel by viewModelBuilder {
MyViewModel(repo = MyRepository())
}
/**
* Get a [ViewModel] in an [ComponentActivity].
*/
@MainThread
inline fun <reified VM : ViewModel> ComponentActivity.viewModelBuilder(
noinline viewModelInitializer: () -> VM
): Lazy<VM> {
return ViewModelLazy(
viewModelClass = VM::class,
storeProducer = { viewModelStore },
private val model: MyViewModel by activityViewModels {
createWithFactory {
MyViewModel(repo = MyRepository())
}
}
fun createWithFactory(
create: () -> ViewModel
): ViewModelProvider.Factory {
return object : ViewModelProvider.Factory {
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
@Suppress("UNCHECKED_CAST")// Casting T as ViewModel
return create.invoke() as T
}
}
}
class MyActivity : AppCompatActivity() {
private val model: MyViewModel by viewModels()
override fun onCreate(savedInstanceState: Bundle?) {
model.getUsers().observe(this, Observer<List<User>>{ users ->
// update UI
})
}
}