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 / phantomtypes.kt
Created Dec 12, 2019
kotlin phantom types example - (generics, extensions)
View phantomtypes.kt
// phantom types
sealed class DoorState
object Open: DoorState()
object Closed: DoorState()
class Door(val state: DoorState) {
bastman /
Created Nov 27, 2019
how to encrypt/decrypt secret files ?

how to encrypt/decrypt secret files ?

mozilla sops is an editor of encrypted files that supports YAML, JSON, ENV, INI and BINARY formats and encrypts with AWS KMS, GCP KMS, Azure Key Vault and PGP

bastman / annotations.kt
Created Nov 21, 2019
spring-kotlin: custom annotations example
View annotations.kt
* Annotations: @RestApiQueryHandler, @RestApiMutationHandler
* as specialization of @Component
* see: @Service for impl.
import org.springframework.core.annotation.AliasFor
import org.springframework.stereotype.Component
bastman / generics.kt
Last active Dec 23, 2019
kotlin generics playground
View generics.kt
// The ins and outs of Kotlin:
bastman / minutest-testfactory-example.kt
Last active Dec 19, 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") {
You can’t perform that action at this time.