Skip to content

Instantly share code, notes, and snippets.

View manuelbernhardt's full-sized avatar

Manuel Bernhardt manuelbernhardt

View GitHub Profile
[
{
"jmhVersion" : "1.28",
"benchmark" : "io.bernhardt.workflow.payment.PaymentHandlingWorkflowBenchmark.oneWorkerTwoWorkflowsCassandra",
"mode" : "sample",
"threads" : 16,
"forks" : 1,
"jvm" : "/home/manu/.sdkman/candidates/java/14.0.2-open/bin/java",
"jvmArgs" : [
"-Dfile.encoding=UTF-8",
@manuelbernhardt
manuelbernhardt / results-latency.json
Last active April 28, 2021 18:27
temporal-throughput-quick-bench
[
{
"jmhVersion" : "1.28",
"benchmark" : "io.bernhardt.workflow.payment.PaymentHandlingWorkflowBenchmark.oneWorkerTwoWorkflows",
"mode" : "sample",
"threads" : 16,
"forks" : 1,
"jvm" : "/home/manu/.sdkman/candidates/java/14.0.2-open/bin/java",
"jvmArgs" : [
"-Dfile.encoding=UTF-8",
@manuelbernhardt
manuelbernhardt / automations.yaml
Created June 25, 2020 11:22
Home assistant configuration for Tradfri
- id: '1'
alias: Restore Light at day entrance
trigger:
- entity_id: light.entrance_spot_1,light.entrance_spot_2,light.entrance_spot_3,light.entrance_spot_4
from: 'off'
platform: state
to: 'on'
- entity_id: light.entrance_spot_1,light.entrance_spot_2,light.entrance_spot_3,light.entrance_spot_4
from: unavailable
platform: state
@manuelbernhardt
manuelbernhardt / Busy.java
Created July 20, 2016 07:02
Calculates PI to keep CPU busy
package com.typesafe.training.coffeehouse;
import scala.concurrent.duration.Duration;
import java.math.BigDecimal;
public class Busy {
public static BigDecimal busy(Duration duration) {
return pi(System.nanoTime() + duration.toNanos());
@manuelbernhardt
manuelbernhardt / gist:531261f954afc4342536
Last active August 29, 2015 14:23
DefaultDataType.java
diff --git a/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java b/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java
index 5231af3..fd19cce 100644
--- a/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java
+++ b/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java
@@ -720,6 +717,15 @@ public class DefaultDataType<T> implements DataType<T> {
if (dialect != null) {
result = TYPES_BY_TYPE[dialect.family().ordinal()].get(type);
+
+ // check if we know about interfaces implemented by the type
@manuelbernhardt
manuelbernhardt / CQRSEventHandler.scala
Created June 2, 2015 16:35
CQRS & jOOQ example in Scala
package actors
import java.sql.Timestamp
import akka.actor.{Actor, ActorLogging}
import helpers.Database
import generated.Tables._
import org.jooq.impl.DSL._
class CQRSEventHandler extends Actor with ActorLogging {
@manuelbernhardt
manuelbernhardt / gist:09cbfa52e466d0cd7ae1
Created May 7, 2015 06:06
jOOQ integration in a `build.sbt` file
libraryDependencies ++= Seq(
"org.jooq" % "jooq" % "3.6.0",
"org.jooq" % "jooq-codegen-maven" % "3.6.0",
"org.jooq" % "jooq-meta" % "3.6.0"
)
val generateJOOQ = taskKey[Seq[File]]("Generate JooQ classes")
val generateJOOQTask = (sourceManaged, dependencyClasspath in Compile, runner in Compile, streams) map { (src, cp, r, s) =>
toError(r.run("org.jooq.util.GenerationTool", cp.files, Array("conf/authentication.xml"), s.log))
trait Command
trait Event
case class A(....) extends Command
case class B(....) extends Command
case class C(....) extends Command
case class D(....) extends Command
case class AA(...) extends Event
case class BB(...) extends Event

Keybase proof

I hereby claim:

  • I am manuelbernhardt on github.
  • I am manuelbernhardt (https://keybase.io/manuelbernhardt) on keybase.
  • I have a public key whose fingerprint is 55EF 42DE 0756 39CD 912D 9BEF BBF8 0641 C9A1 4ACC

To claim this, I am signing this object: