This file contains hidden or 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
khd kwm on | |
khd mode layout prefix on | |
khd mode layout timeout 2 | |
khd mode layout restore default | |
khd mode default color 0xFFFFFFFF | |
ctrl - tab : khd -e "mode activate layout";\ | |
kwmc config border focused on; \ | |
kwmc config border focused size 2; \ |
This file contains hidden or 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
kwmc config padding 20 20 20 20 | |
#kwmc config gap 0 0 | |
kwmc config tiling bsp | |
kwmc config float-non-resizable on | |
kwmc config lock-to-container on | |
kwmc config focus-follows-mouse off | |
kwmc config standby-on-float on | |
kwmc config center-on-float on | |
kwmc config mouse-follows-focus on | |
kwmc config mouse-drag on |
This file contains hidden or 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._ | |
import cats.free.Free | |
import cats.implicits._ | |
import freek._ | |
sealed trait LogDSL[A] | |
case class Info(msg: String) extends LogDSL[Unit] |
This file contains hidden or 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
/* | |
Results | |
[info] Running StreamsExperiments | |
[info] Count: 923062246 | |
[info] Time: 5301 | |
[info] Count: 923062246 | |
[info] Time: 4588 | |
[info] Count: 923062246 | |
[info] Time: 4460 | |
[info] Count: 923062246 |
This file contains hidden or 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 fs2 | |
import java.util.zip.{CRC32, DataFormatException, Deflater, Inflater} | |
import scala.annotation.tailrec | |
import scala.collection.mutable.ArrayBuffer | |
/** Provides utilities for compressing/decompressing byte streams. */ | |
object compress { |
This file contains hidden or 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 scripts | |
import java.io.File | |
import scala.concurrent.{Await, ExecutionContext, Future} | |
import scala.concurrent.duration._ | |
import scala.language.higherKinds | |
import fs2._ | |
import fs2.Task._ | |
import fs2.interop.cats._ | |
import fs2.util.{Attempt, Catchable, Suspendable} |
This file contains hidden or 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 freek._ | |
import cats.{Id,~>} | |
import cats.data.Xor | |
import cats.free.Free | |
object XorExample extends App{ | |
sealed trait Algebra[A] | |
case object Good extends Algebra[Xor[Throwable,String]] | |
case object Bad extends Algebra[Xor[Throwable,String]] |
This file contains hidden or 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
def graphql: Endpoint[Json] = { | |
post( | |
"graphql" ? (body :: authOptReader :: contentTypeReader :: imageOptReader :: queryReader :: variablesReader) | |
){ (body: String, authOpt: Option[TokenUUID], contentType: String, image: Option[FileUpload], query: Option[String], variables: Option[String]) => | |
contentType.take("multipart/form-data".length) match { | |
case "multipart/form-data" => { | |
for { | |
auth <- getAuthorization(authOpt) |
This file contains hidden or 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
def get[T](key: String): KVStore[T] = liftF(Get[T, T](key, identity)) |
This file contains hidden or 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 sangria.schema._ | |
import sangria.execution.Executor | |
import sangria.parser.QueryParser | |
import sangria.renderer.SchemaRenderer | |
import sangria.integration.PlayJsonSupport._ | |
import scala.util.{Success} | |
import scala.concurrent.ExecutionContext.Implicits.global |