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 | |
# netcat -l 7000 </dev/ttyUSB0 >/dev/ttyUSB0 & | |
cat /dev/ttyUSB0 | tee /var/log/lyngdorfSerial.ComToTcp.log | netcat -l 7000 | tee /var/log/lyngdorfSerial.TcpToCom.log > /dev/ttyUSB0 & | |
# Linux resets state when netcat closes com-port, so we need to se this after opening netcat | |
stty -F /dev/ttyUSB0 115200 cs8 -cstopb -parenb | |
killtree() { |
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
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
#Finds the first gradle in the list below | |
#Runs gradle with the arguments to this script in current dir | |
$gradlePaths = @("./gradlew","../gradlew", "gradle") | |
$currentGradlePaths = ( $gradlePaths | ?{ gcm $_ -erroraction 'silentlycontinue' } ) | |
if ($currentGradlePaths.Length -gt 0) { | |
if ($currentGradlePaths -is [array]) { | |
$gradle = $currentGradlePaths[0] | |
} else { |
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
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
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; |
OlderNewer