Skip to content

Instantly share code, notes, and snippets.

View fokot's full-sized avatar

František Kocun fokot

  • Bratislava, Slovakia
View GitHub Profile
@jdegoes
jdegoes / zio-workshops.md
Last active December 29, 2019 16:33
Possible ZIO Workshops
  • Scheduling & Retrying with ZIO: A 2 hour workshop that shows how to create and use schedules and retry policies with ZIO. Scheduling covers cache use cases, downloading resources, sending emails; retrying covers flaky web APIs, database connections, etc.
  • ZIO CRUD. A 2 hour workshop showing how to build a basic REST API using ZIO + third-party library.
  • Using ZIO with Legacy Code: A 2 hour workshop that shows how to wrap lots of legacy code: sync code, async code, Future code; and demonstrate use of Runtime to unsafeRun at boundary points for roundtrip integration.
  • Crash Course in ZIO: A 2 hour workshop that covers “hello world” and a few other simple examples of writing programs with ZIO, with an emphasis on thinking functionality (values & operators on values) and using ‘for’ comprehensions successfully.
  • Rethinking Error Management: A 2 hour workshop that shows how to effectively use recoverable and non-recoverable errors, as well as lossless errors, to build resilient apps that
@pathikrit
pathikrit / Config.scala
Last active March 5, 2020 14:22
Better Config
import scala.util.control.NonFatal
import better.files.Scanner.Read
/**
* Extend this trait to create your application config
*
* Pros of this approach:
* 1) Library free approach - only 15 lines of dependency free "library" (four one-line defs for you to override)
* 2) Failures happen when the Config object is loaded instead of when a config value is accessed
* 3) Strongly typed
@augbog
augbog / Free O'Reilly Books.md
Last active May 14, 2024 10:27
Free O'Reilly Books

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x