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 dk.messaging; | |
import com.google.common.truth.Truth; | |
import com.openpojo.reflection.PojoClass; | |
import com.openpojo.reflection.impl.PojoClassFactory; | |
import org.jetbrains.annotations.NotNull; | |
import org.junit.jupiter.api.DynamicTest; | |
import org.junit.jupiter.api.Test; | |
import org.junit.jupiter.api.TestFactory; |
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 android.annotation.SuppressLint | |
import kotlinx.serialization.KSerializer | |
import kotlinx.serialization.SerialName | |
import kotlinx.serialization.Serializable | |
import kotlinx.serialization.descriptors.PrimitiveKind | |
import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor | |
import kotlinx.serialization.descriptors.SerialDescriptor | |
import kotlinx.serialization.encoding.Decoder | |
import kotlinx.serialization.encoding.Encoder | |
import kotlinx.serialization.json.Json |
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 dk.bnr.androidbooking.managers.model.AppInternalSilentException | |
import kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.channels.Channel | |
import kotlinx.coroutines.launch | |
interface OnResultCallback<T> { | |
fun onNext(value: T) | |
fun onError(throwable: Exception) |
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 kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.channels.Channel | |
import kotlinx.coroutines.launch | |
interface OnCompleteCallback { | |
fun complete() | |
/** |
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 sms | |
import android.annotation.SuppressLint | |
import android.content.Context | |
import android.content.pm.PackageManager | |
import android.os.Build | |
import android.util.Base64 | |
import android.util.Log | |
import java.nio.charset.StandardCharsets | |
import java.security.MessageDigest |
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
Function Measure-TMCommand { | |
<# | |
.SYNOPSIS | |
Continually measure a command (or commands) and/or a script (or scripts) up to a user-defined number of repetitions. | |
.DESCRIPTION | |
Continually measure a command (or commands) and/or a script (or scripts) up to a user-defined number of repetitions. As well, the advanced function will calculate averages, can include limited hardware specs about the computer that is performing the measurements, and can even display the output of the commands and/or scripts being measured. | |
.PARAMETER Command |
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
# all logging settins are here on top | |
$logFile = "log-$(gc env:computername).log" | |
$logLevel = "DEBUG" # ("DEBUG","INFO","WARN","ERROR","FATAL") | |
$logSize = 1mb # 30kb | |
$logCount = 10 | |
# end of settings | |
function Write-Log-Line ($line) { | |
Add-Content $logFile -Value $Line | |
Write-Host $Line |
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
# all logging settins are here on top | |
$logFile = "log-$(gc env:computername).log" | |
$logLevel = "DEBUG" # ("DEBUG","INFO","WARN","ERROR","FATAL") | |
$logSize = 1mb # 30kb | |
$logCount = 10 | |
# end of settings | |
function Write-Log-Line ($line) { | |
Add-Content $logFile -Value $Line | |
Write-Host $Line |
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 ammonite.ops._ | |
import ujson.Js.Value | |
import upickle.default.{macroRW, ReadWriter => RW} | |
//import scala.math.Ordering.Implicits._ | |
//https://transform.now.sh/json-to-scala-case-class | |
case class SubLanguage(ext: String, url: String) | |
object SubLanguage { // uPickle 0.7.1 needs these to parse the objects. Really ugly, maybe gson is better? | |
implicit val rw: RW[SubLanguage] = macroRW |
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 ammonite.ops._ | |
import ujson.Js.Value | |
import upickle.default.{macroRW, ReadWriter => RW} | |
//import scala.math.Ordering.Implicits._ | |
//https://transform.now.sh/json-to-scala-case-class | |
case class Da(ext: String, url: String) | |
object Da { // uPickle 0.7.1 needs these to parse the objects. Really ugly, maybe gson is better? | |
implicit val rw: RW[Da] = macroRW |
NewerOlder