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
SPC s c remove highlight | |
SPC T s list themes | |
SPC w b focus mini-buffer | |
SPC z x font size minor mode | |
**** Files manipulations key bindings | |
Files manipulation commands (start with ~f~): | |
| Key Binding | Description | | |
|-------------+----------------------------------------------------------------| |
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 fs2.concurrent.Queue | |
import cats.implicits._ | |
import cats.effect.Concurrent | |
import cats.effect.concurrent.Ref | |
def groupBy[F[_], A, K](selector: A => F[K])(implicit F: Concurrent[F]): Pipe[F, A, (K, Stream[F, A])] = { | |
in => | |
Stream.eval(Ref.of[F, Map[K, Queue[F, Option[A]]]](Map.empty)).flatMap { st => | |
val cleanup = { | |
import alleycats.std.all._ |
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 cats.effect._ | |
import scala.concurrent.ExecutionContext | |
import java.nio.file.Paths | |
import io.circe.generic.auto._ | |
import io.circe.fs2._ | |
implicit val ec: ExecutionContext = ExecutionContext.global | |
implicit val ioContextShift: ContextShift[IO] = IO.contextShift(ec) | |
case class Repo(repo: String, stars: Int) |
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 fs2.{Stream, Pipe} | |
import cats.effect.{Sync, IO} | |
trait Logger[F[_]] { | |
def infoF(msg: String)(implicit F: Sync[F]): F[Unit] | |
def info(msg: String): Unit | |
def errorF(msg: String, e: Throwable)(implicit F: Sync[F]): F[Unit] | |
} | |
class ConsoleLogger[F[_]] extends Logger[F] { |
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 $ivy.`co.fs2::fs2-core:1.0.0` | |
import fs2.{Stream, Pipe} | |
import fs2.concurrent.Queue | |
import cats.effect.{IO, ContextShift, Timer, Concurrent} | |
import scala.util.Random | |
import scala.concurrent.duration._ | |
import scala.concurrent.ExecutionContext |
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 $ivy.`org.systemfw::upperbound:0.2.0-M1` | |
import fs2._, concurrent._ | |
import upperbound._ | |
import cats.effect.{IO, ContextShift, Timer} | |
import upperbound.syntax.rate._ | |
import scala.concurrent.duration._ | |
import scala.concurrent.ExecutionContext | |
implicit val ec: ExecutionContext = ExecutionContext.global |
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 $ivy.`io.github.dmateusp::fs2-aws:0.26.4` | |
import fs2._ | |
import cats.implicits._ | |
import cats.effect.{IO, ContextShift, Timer} | |
import cats.effect.concurrent.Ref | |
import scala.concurrent.duration._ | |
import scala.concurrent.ExecutionContext | |
import fs2.aws.kinesis.kcl._ |
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
### Keybase proof | |
I hereby claim: | |
* I am kiambogo on github. | |
* I am kiambogo (https://keybase.io/kiambogo) on keybase. | |
* I have a public key whose fingerprint is 2AA8 7B49 D5DB 54FD 584F 1643 456A 1530 1A39 4B49 | |
To claim this, I am signing this object: |
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 main | |
import "log" | |
type Node struct { | |
val int | |
next *Node | |
} | |
type Stack struct { |
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 main | |
import "log" | |
type Node struct { | |
val int | |
next *Node | |
} | |
type Queue struct { |
OlderNewer