Skip to content

Instantly share code, notes, and snippets.

View guizmaii's full-sized avatar
🏄‍♂️

Jules Ivanic guizmaii

🏄‍♂️
View GitHub Profile
@guizmaii
guizmaii / memory-limit-request-jvm.md
Created September 8, 2023 17:12 — forked from petrbouda/memory-limit-request-jvm.md
Memory LIMIT and REQUEST in Containers and JVM

Memory LIMIT and REQUEST in Containers and JVM

  • Do you run a JVM inside a container on Kubernetes (or maybe OpenShift)?
  • Do you struggle with REQUEST and LIMIT parameters?
  • Do you know the impact of those parameters on your JVM?
  • Have you met OOM Killer?

Hope you will find answers to these questions in this example-based article.

How to set up JVM Heap size in a Container

package cqrs
package eventstore
import zio.*
import zio.prelude.*
import zio.prelude.fx.*
object BaseSyntax:
type Program[S, R, E, A] = ZPure[Nothing, S, S, R, E, A]

Greasing the Skids: Building Remote Teams

In the wake of the virus that-must-not-be-named (which most people misname anyway), it seems like everyone and their cat has posted some sort of opinion or how-to on making remote work, work. This is a good thing! Working remotely, particularly full-time, is hard! I've done it for my entire career (aside from an odd 14 month office period in the middle that we shall not speak of), but more relevantly, for the past two years I've been responsible for building, managing, and enabling an entirely remote team, distributed across nine timezones. Remote teams don't just happen by installing Slack and telling everyone to work on their couch: they require a lot of effort to do correctly and efficiently. But, done right, it can be a massive multiplier on your team efficiency and flexibility.

Here's how we do it. I'm going to attempt to structure this post more towards management than engineering, and so I apologize in advance if I assume terminology or knowledge which

@guizmaii
guizmaii / README.md
Created July 1, 2021 09:54 — forked from davideicardi/README.md
Publish Maven library to Github packages with SBT and github actions

Publish

Add the following configuration to your build.sbt:

  // publish to github packages settings
  publishTo := Some("GitHub <GITHUB_OWNER> Apache Maven Packages" at "https://maven.pkg.github.com/<GITHUB_OWNER>/<GITHUB_PROJECT>"),
  publishMavenStyle := true,
  credentials += Credentials(
    "GitHub Package Registry",
@guizmaii
guizmaii / things-i-believe.md
Created January 4, 2021 00:30 — forked from stettix/things-i-believe.md
Things I believe

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette. See also my blog at www.janvsmachine.net.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.

import cats.effect.ExitCode
import monix.eval.{Task, TaskApp}
import monix.execution.atomic.Atomic
class MtCache[A](ref: Atomic[Map[String, Task[A]]]) {
def cache(key: String)(task: () => A): Task[A] = {
ref.transformAndExtract { current =>
current.get(key) match {
import cats.effect.ExitCode
import monix.eval.{Task, TaskApp}
import monix.execution.atomic.Atomic
class MtCache[A](ref: Atomic[Map[String, Task[A]]]) {
def cache(key: String)(task: () => A): Task[A] = {
ref.transformAndExtract { current =>
current.get(key) match {
@guizmaii
guizmaii / ZioExecSemantic.scala
Created April 22, 2019 21:00 — forked from fanf/ZioExecSemantic.scala
Show how ZIO behave with/without fiber fork.
/*
* This test shows that without a fork, execution is purely mono-fiber and sequential.
*/
object TestZioExecSemantic {
val rt = new DefaultRuntime {}
trait LOG {
def apply(s: String): UIO[Unit]
}
def makeLog = UIO(new LOG {
val zero = System.currentTimeMillis()
@guizmaii
guizmaii / GroupableOps.scala
Created April 16, 2019 13:22 — forked from fernandomora/GroupableOps.scala
Scala groupMap from 2.13 for scala 2.12
import scala.collection.{immutable, mutable, GenTraversableOnce}
import scala.collection.generic.CanBuildFrom
object GroupableOps {
implicit class ToGroupable[A, Coll[X] <: GenTraversableOnce[X]](coll: Coll[A]) {
// https://github.com/scala/scala/blob/v2.13.0-M5/src/library/scala/collection/Iterable.scala#L578
def groupMap[K, B, To](key: A => K)(f: A => B)
(implicit bf: CanBuildFrom[Coll[A], B, To]): immutable.Map[K, To] = {
/*
This piece of commented code aims to clarify some
misconceptions between several advanced concepts
in pure functional programming/category theory:
free monads, finally tagless approach, algebraic
effects.
These concepts are actually very close. They rely
on similar concepts and even represent the "same"
object (up to isomorphism!) from the theoretical