Skip to content

Instantly share code, notes, and snippets.

View ishubham-k's full-sized avatar
🖥️
On line

Shubham K ishubham-k

🖥️
On line
View GitHub Profile
@ishubham-k
ishubham-k / 01_pkcs12-cacerts-workaround.sh
Created June 8, 2018 06:14 — 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.
@ishubham-k
ishubham-k / gist:c1326f7c28db28ffcfc0ebf54a7f4f88
Created April 4, 2017 11:02 — forked from jeffsteinmetz/gist:063bd3237033f3af2ed9
Generate Unique, Hashed, Random Token in Scala for use in API calls or as an OAuth Token Bearer
import scala.util._
import java.security.SecureRandom
import java.security.MessageDigest
/*
* Generates a Bearer Token with a length of
* 32 characters (MD5) or 64 characters (SHA-256) according to the
* specification RFC6750 (http://tools.ietf.org/html/rfc6750)
*
* Uniqueness obtained by hashing system time combined with a