This file contains 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
package com.example.test | |
import io.reactivex.Observable | |
import io.reactivex.Observer | |
import io.reactivex.Scheduler | |
import io.reactivex.disposables.Disposable | |
import io.reactivex.observers.TestObserver | |
import io.reactivex.schedulers.Schedulers | |
import io.reactivex.subjects.BehaviorSubject | |
import org.junit.Assert.* |
This file contains 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
#!/bin/bash | |
# disables bloat packages on samsung devices | |
# tested with z fold 2 | |
packages_to_uninstall=( | |
"com.microsoft.skydrive" \ | |
"com.microsoft.office.excel" \ | |
"com.microsoft.office.word" \ | |
"com.microsoft.office.powerpoint" \ |
This file contains 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
// because this keeps coming up in coding challenges and I hate solving this from scratch | |
class Node( | |
var word: String? = null, | |
val next: MutableList<Node?> = MutableList(26) { null } | |
) | |
// inserting | |
fun Node.insert(word: String) { | |
var current = this |
This file contains 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
#!/bin/bash | |
# disables bloat packages on samsung devices | |
# tested with z fold 3 | |
packages_to_uninstall=( | |
"com.microsoft.skydrive" \ | |
"com.microsoft.office.excel" \ | |
"com.microsoft.office.word" \ | |
"com.microsoft.office.powerpoint" \ |
This file contains 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 org.junit.Assert.assertEquals | |
import org.junit.Assert.assertNotNull | |
import org.junit.Test | |
import org.mockito.kotlin.* | |
class RepositoryImplTest { | |
@Test | |
fun `without validating prefix`() { | |
// setup | |
val mockApi: Api = mock() |
This file contains 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
const data = require('./definitions.json'); | |
const definitions = data.reduce((acc, item) => { | |
const { id, ...others } = item | |
acc[item.id] = others | |
return acc | |
}, {}) | |
const { exec } = require('child_process'); | |
const util = require('util'); |
This file contains 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
#!/bin/bash | |
# Retrieve the list of packages | |
packages=$(adb shell pm list packages | sed 's/package://') | |
# Convert the packages to an array | |
IFS=$'\n' read -d '' -r -a package_array <<< "$packages" | |
total_packages=${#package_array[@]} |