Skip to content

Instantly share code, notes, and snippets.

@fntz
fntz / main.go
Created October 10, 2025 10:02
main.go
package main
import (
"fmt"
"time"
"github.com/samber/lo"
lop "github.com/samber/lo/parallel"
)
// Sample config (with sqlite backend)
truerss {
port = 8000
host = localhost
wsPort = 8080
update-parallelism = 10
db {
backend = sqlite
port = ""
host = ""
@fntz
fntz / Boot.scala
Created January 6, 2015 16:03
Rest Api with spray
import akka.io.IO
import akka.actor.{ActorSystem, Props}
import spray.can.Http
object Boot extends App {
implicit val system = ActorSystem("rest")
val restService = system.actorOf(Props[RestApiService], "rest-api")
@fntz
fntz / main.scala
Created July 7, 2014 13:54
Generate wrap for case branches
object Main extends App {
@wrap def method(s: String): Option[Int] = s match {
case x if x == "1" => 1
case x if x == "2" => 2
}
println(method("1"))
println(method("2"))
println(method("3"))