Skip to content

Instantly share code, notes, and snippets.

View amitkumar0000's full-sized avatar
🌴
kotlin

Amit kumar amitkumar0000

🌴
kotlin
  • Zeta
  • bangalore
View GitHub Profile
@tfcporciuncula
tfcporciuncula / 1 - ci.yml
Last active January 10, 2024 14:02
Keeping a project dependency graph on the README up to date automatically by always generating it on CI with a GitHub Action
generate-dependency-graph:
name: Generate Dependency Graph
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
@starkej2
starkej2 / RxImmediateSchedulerRule.kt
Last active December 30, 2021 18:33
RxJava Immediate Scheduler Test Rule
/**
* Replaces the default RxJava schedulers with a synchronous one.
*/
class RxImmediateSchedulerRule : TestRule {
private val immediateScheduler = object : Scheduler() {
@NonNull
override fun scheduleDirect(run: Runnable, delay: Long, unit: TimeUnit): Disposable {
// Hack to prevent stack overflows in unit tests when scheduling with a delay;
return super.scheduleDirect(run, 0, unit)
}