Skip to content

Instantly share code, notes, and snippets.

Seb Schmidt bastman

Block or report user

Report or block bastman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
bastman / generics.kt
Last active Nov 15, 2019
kotlin generics playground
View generics.kt
data class In<out T:Number>(val c:T)
data class Out<out E>(val c:E)
bastman / minutest-testfactory-example.kt
Last active Nov 5, 2019
kotlin-minutest: the missing docs ... how to use @testfactory
View minutest-testfactory-example.kt
// see:
// see:
// gradle dependency (jcenter): testImplementation("dev.minutest:minutest:1.9.+")
// how to use?
class FooTests {
fun `some dynamic tests`() = rootContext {
test(name="a test") {
bastman / nullable.kt
Created Oct 31, 2019
kotlin reified T is nullable ?
View nullable.kt
inline fun <reified T> isNullable(): Boolean = null is T
bastman /
Last active Oct 16, 2019
awesome shell implementations
bastman / FooTest.kt
Last active Oct 15, 2019
View FooTest.kt
package com.example
import com.fasterxml.jackson.databind.DeserializationFeature
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.SerializationFeature
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
import org.junit.jupiter.api.Test
bastman / BlobStorageUri.kt
Created Aug 7, 2019
BlobStorageUri (kotlin, jackson)
View BlobStorageUri.kt
import com.fasterxml.jackson.annotation.JsonCreator
import com.fasterxml.jackson.annotation.JsonValue
data class BlobStorageUri(
val account: String,
val container: String,
val key: String
) {
val uri: String
$ export PGSSLMODE=prefer
$ psql ...
You can’t perform that action at this time.