Skip to content

Instantly share code, notes, and snippets.

View timohirt's full-sized avatar

Timo Hirt timohirt

  • Merck KGgA
  • Mainz
View GitHub Profile
println("Hello World")
// Vars / static types
var v1: String = "Test"
v1 = "Test 2"
//v1 = 2 -> Fehler, da va bereits Type String
// Type inference
var v2 = "Variable 2"
case class Score(p1: Int, p2: Int)
// Alles ist eine Expression
val score = Score(5, 1)
val winner = if (score.p1 > score.p2) "Player 1" else "Player 2"
val looser = if (score.p1 > score.p2) "Player 2" else "Player 1"
// Tupel
val winnerLooser =
@timohirt
timohirt / PrometheusMetricsController.scala
Created February 22, 2016 14:37
Play! Framework Controller exposing Prometheus metrics
package controllers
import java.io.Writer
import io.prometheus.client.CollectorRegistry
import io.prometheus.client.exporter.common.TextFormat
import play.api.libs.iteratee.Concurrent
import play.api.mvc.{Action, Controller}
/*
Terraform Version: 0.10.8
Resource ID: aws_launch_configuration.master_launch_configuration
Mismatch reason: extra attributes: image_id
Diff One (usually from plan): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{"security_groups.#":*terraform.ResourceAttrDiff{Old:"", New:"2", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "security_groups.63137120":*terraform.ResourceAttrDiff{Old:"", New:"sg-04a1226e", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "root_block_device.0.volume_size":*terraform.ResourceAttrDiff{Old:"", New:"20", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "root_block_device.#":*terraform.ResourceAttrDiff{Old:"", New:"1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0},
@timohirt
timohirt / gist:d2d2554b72f0b8d3ab797568ae389a9a
Created January 26, 2025 18:22
GSC-Nicholas-Link-SchwarzwaldGT
200 OPjective Control(2000 points)
Genestealer Cults
Strike Force (2000 points)
Outlander Claw
CHARACTERS
Reductus Saboteur (75 points)
@timohirt
timohirt / gist:27683fe071bc6961249fb00e746efcf5
Created January 26, 2025 18:25
GreyKnights-Clemens Haerder-SchwarzwaldGT
Warping in the Winter Wonderland (1995 Points)
Grey Knights
Warpbane Task Force
Strike Force (2000 Points)
CHARACTERS
Brotherhood Champion (95 Points)
• 1x Nemesis force weapon