Skip to content

Instantly share code, notes, and snippets.

@ekuzmichev
ekuzmichev / git_utils.sh
Last active June 28, 2021 09:57
Git utility commands
# Remove all local branches that do not exist (gone) on remote
git fetch -p && for branch in $(git branch -vv | grep ': gone]' | awk '{print $1}'); do git branch -D $branch; done
@ekuzmichev
ekuzmichev / ZLayerPlayground.scala
Last active June 9, 2020 12:48
ZIO ZLayer DI playground
import zio._
object ZLayerPlayground {
case class User(id: String, name: String)
class MongoDb {
def insertUser(user: User): Task[Unit] = Task.succeed(()) <* UIO(println(s"[MongoDb]: Inserted user $user"))
}
object MongoDbLayer {