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 | |
. /home/gopinath/.bashrc | |
cd $HOME | |
export JAVA_HOME=/home/gopinath/.sdkman/candidates/java/current | |
export PATH=/usr/local/bin:$PATH | |
export PATH=/usr/bin:$PATH | |
export PATH=/home/gopinath/.sdkman/candidates/java/current/bin:$PATH | |
export PATH=/home/gopinath/.sdkman/candidates/kotlin/current/bin:$PATH | |
export PATH=/home/gopinath/.sdkman/candidates/kscript/current/bin:$PATH | |
kscript /home/gopinath/backupper.kts -b prod_backups -d prod_db,client_db -v -r |
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.runBlocking | |
import org.bson.types.ObjectId | |
import org.junit.* | |
import org.junit.Assert.* | |
import org.testcontainers.containers.MongoDBContainer | |
import org.testcontainers.containers.wait.strategy.HostPortWaitStrategy | |
import org.testcontainers.utility.DockerImageName | |
import java.math.BigInteger |
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 java.util.concurrent.atomic.AtomicReference | |
import kotlin.properties.ReadWriteProperty | |
import kotlin.reflect.KProperty | |
private fun <T>atomicNullable(tIn: T? = null): ReadWriteProperty<Any?, T?> { | |
return object : ReadWriteProperty<Any?, T?> { | |
val t = AtomicReference<T>(tIn) | |
override fun getValue(thisRef: Any?, property: KProperty<*>): T? { | |
return t.get() |
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 delegates | |
import java.lang.ref.SoftReference | |
import java.lang.ref.WeakReference | |
import kotlin.properties.ReadWriteProperty | |
import kotlin.reflect.KProperty | |
fun <T>weakReference(tIn: T? = null): ReadWriteProperty<Any?, T?> { | |
return object : ReadWriteProperty<Any?, T?> { |
OlderNewer