Skip to content

Instantly share code, notes, and snippets.

On line

ShubhamK ishubham-k

On line
View GitHub Profile
mikaelhg /
Last active August 4, 2023 06:01
Workaround for 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 ...
# to verify that this workaround is relevant to your particular issue.
# The parameter by itself can be used as a workaround, as well.
yossorion /
Last active September 12, 2023 12:23
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

ignasi35 / SlackService.scala
Last active January 4, 2019 18:05
A PoC client for Slack's "Custom Integrations" implemented as a Lagom Service.
View SlackService.scala
package com.example.hello.api
import akka.NotUsed
import com.example.hello.api.SlackCustomIntegration.Message
import com.lightbend.lagom.scaladsl.api.{Descriptor, Service, ServiceCall}
import com.lightbend.lagom.scaladsl.api.Service._
import com.lightbend.lagom.scaladsl.api.transport.Method
import play.api.libs.json._
import play.api.libs.functional.syntax._

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
View UploadHandler.scala
package akkahttptest
import akka.http.scaladsl.Http
import akka.http.scaladsl.server.Route
import akka.http.scaladsl.server.Directives._
object UploadHandler extends App {
jeffsteinmetz / gist:063bd3237033f3af2ed9
Last active May 31, 2021 11:29
Generate Unique, Hashed, Random Token in Scala for use in API calls or as an OAuth Token Bearer
View gist:063bd3237033f3af2ed9
import scala.util._
* Generates a Bearer Token with a length of
* 32 characters (MD5) or 64 characters (SHA-256) according to the
* specification RFC6750 (
* Uniqueness obtained by hashing system time combined with a