Skip to content

Instantly share code, notes, and snippets.

View Krever's full-sized avatar

Voytek Pituła Krever

View GitHub Profile
@Krever
Krever / _README.md
Last active February 5, 2025 16:33
Yabai setup for i3wm users
@Krever
Krever / DotRenderer.scala
Last active April 21, 2023 06:41
Graphviz Dot AST
object DotRenderer {
def render(graph: Graph): String = {
graph match {
case DirectedGraph(strict, id, stmtList) =>
s"${if (strict) "strict " else ""}digraph ${id.getOrElse("")} {${renderStmtList(stmtList)}}"
case UndirectedGraph(strict, id, stmtList) =>
s"${if (strict) "strict " else ""}graph ${id.getOrElse("")} {${renderStmtList(stmtList)}}"
}
}
@Krever
Krever / README.md
Last active October 6, 2024 23:43
Find Audible whishlist title worth buying.

Scripts are based on python audible lib, install accordign to docs: https://audible.readthedocs.io/en/latest/index.html

  1. Modify auth.py with your credentials
  2. Run auth.py - your creds will be saved in creds.txt for further calls
  3. Run dump_whishlist.py - your whishlist will be saved in whishslist.json
  4. Run filter-whishlist-for-sale.py - it will printout all titles below the credit price
@Krever
Krever / wio.scala
Last active April 2, 2024 05:23
context-dependent-wio
// This is a very minimal example showcasing how we can levarage type members to capture fixed types without the need
// to introduce more type parameters
trait WorkflowContext {
type State
type Event
// operation that transforms In into Out, while guaranteeing the output is a substate os State
@Krever
Krever / build-native-image.sh
Created July 29, 2024 08:19
picocli grpc CLI in scala build with native-image
#!/usr/bin/env bash
scala-cli \
--power \
package \
--native-image \
--graalvm-java-version 21 \
--graalvm-version 21.0.2 \
./main \
-o sbadmin2 \