Skip to content

Instantly share code, notes, and snippets.

View przemek-pokrywka's full-sized avatar

Przemek Pokrywka przemek-pokrywka

View GitHub Profile

Keybase proof

I hereby claim:

  • I am przemek-pokrywka on github.
  • I am przemekpokrywka (https://keybase.io/przemekpokrywka) on keybase.
  • I have a public key ASBg_m-i2q5d06b9QdXWtWhLsVNydC_o6hwc83t6YpsPIgo

To claim this, I am signing this object:

#!/bin/bash
usage() {
cat <<EOF
usage: git gone [-pldD] [<branch>=origin]
OPTIONS
-p prune remote branch
-n dry run: list the gone branches
-d delete the gone branches
-D delete the gone branches forcefully
@przemek-pokrywka
przemek-pokrywka / MagicImportsAreNotValid.scala
Created October 22, 2021 18:36
The Ammonite magic imports are (unfortunately!) NOT a valid Scala 😞 - the issue is that the dots within the version numbers are breaking compilation, even if you use the backticks
package $ivy
object `group::artifact:1` {
object `2` {
object `3` {
val exception = new Exception()
}
}
import $ivy.`group::artifact:1`.`2`.`3`.exception._
@przemek-pokrywka
przemek-pokrywka / example.scala
Last active November 14, 2021 19:51
Can programming be liberated from the ZIO layer style?
/// Powered by TSK - The Scripting Kit https://github.com/tsk-tsk/tsk-tsk 2> /dev/null \\\
/*
export v=0.1.5
. $(b=boot-tsk-$v u=git.io/$b; (cat ~/.tsk/$b || curl -sfL $u || wget -qO - $u) | sh)
scala_version=2.12.13
bloop_version=1.4.11
dependencies='
com.h2database:h2:1.4.199
io.getquill::quill-jdbc-zio:3.8.0
@przemek-pokrywka
przemek-pokrywka / CannotSubstituteMyClock.scala
Created August 5, 2023 20:08
Am I doing something wrong or substituting elements of environment does not work?
//> using dep "dev.zio::zio:2.0.15"
//> using scala 2.13
import zio._
import java.time
import java.time.temporal.ChronoUnit
import java.time.{Instant, LocalDateTime, OffsetDateTime}
import java.util.concurrent.TimeUnit