Skip to content

Instantly share code, notes, and snippets.

View angelcervera's full-sized avatar
🏠
Working from home

Ángel Cervera Claudio angelcervera

🏠
Working from home
View GitHub Profile
@angelcervera
angelcervera / Gzip.scala
Created May 30, 2022 13:47 — forked from owainlewis/Gzip.scala
Gzip Scala
import java.io.{ByteArrayOutputStream, ByteArrayInputStream}
import java.util.zip.{GZIPOutputStream, GZIPInputStream}
import scala.util.Try
object Gzip {
def compress(input: Array[Byte]): Array[Byte] = {
val bos = new ByteArrayOutputStream(input.length)
val gzip = new GZIPOutputStream(bos)
@angelcervera
angelcervera / 01_pkcs12-cacerts-workaround.sh
Created May 5, 2018 07:59 — forked from mikaelhg/01_pkcs12-cacerts-workaround.sh
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.