Skip to content

Instantly share code, notes, and snippets.

View adam-hurwitz's full-sized avatar

Adam Hurwitz adam-hurwitz

View GitHub Profile
@Zhuinden
Zhuinden / ApplicationComponent.kt
Last active September 11, 2021 06:25
Dagger + ViewModel + SavedStateHandle
@Singleton
@Component(modules = [AssistedInjectionModule::class])
interface ApplicationComponent {
fun mySavedStateViewModelFactory(): MySavedStateViewModel.Factory
}
@kakai248
kakai248 / Example.kt
Created February 24, 2020 18:00
Example on how to to inject SavedStateHandle into ViewModel's
// ViewModel factory
@MainThread
inline fun <reified VM : ViewModel> ComponentActivity.viewModel(
noinline provider: (SavedStateHandle) -> VM
) = createLazyViewModel(
viewModelClass = VM::class,
savedStateRegistryOwnerProducer = { this },
viewModelStoreOwnerProducer = { this },
viewModelProvider = provider
@cdmunoz
cdmunoz / cdmi_android.md
Last active February 12, 2020 22:13
Carlos Daniel Muñoz and Android Community

Community Impact: Carlos Daniel Munoz Idarraga

Summary

Impact Description Total
Direct Impact Meetups, confs and talks +1.1k
Indirect Impact Articles, Stack overflow +135k
People Trained Workshops +60
@kristovatlas
kristovatlas / README.md
Created April 16, 2018 01:22
How to verify Trezor Bridge on MacOS (and maybe other operating systems)

Background reading

Verification Steps

  1. Visit https://wallet.trezor.io/data/bridge/latest/index.html. For MacOS, you download a .pkg file.
  2. From https://wallet.trezor.io/data/bridge/latest/index.html also download the PGP signature file.
  3. The Satoshi Labs CTO signs the Bridge releases. Download his PGP key from his Keybase signature: https://keybase.io/stick This means at least that someone created an account with his identity and bothered to link a specific PGP key. If you retain this key over time, you can be sure that it wasn't recently swapped out. You can find same PGP under his identity in various places on the web: https://duckduckgo.com/?q=Pavol+Rusn%C3%A1k+pgp+key&ia=web
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream