Skip to content

Instantly share code, notes, and snippets.

View jruusu's full-sized avatar

Jan Ruusuvuori jruusu

View GitHub Profile
@mikaelhg
mikaelhg / 01_pkcs12-cacerts-workaround.sh
Last active August 4, 2023 06:01
Workaround for java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
# Ubuntu 18.04 and various Docker images such as openjdk:9-jdk throw exceptions when
# Java applications use SSL and HTTPS, because Java 9 changed a file format, if you
# create that file from scratch, like Debian / Ubuntu do.
#
# Before applying, run your application with the Java command line parameter
# java -Djavax.net.ssl.trustStorePassword=changeit ...
# to verify that this workaround is relevant to your particular issue.
#
# The parameter by itself can be used as a workaround, as well.
@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}
/*