Skip to content

Instantly share code, notes, and snippets.


Sam Bessalah samklr

View GitHub Profile
View kamon.conf
play.modules.enabled += "com.samklr.KamonModule"
kamon {
environment {
service = "my-svc"
jaeger {
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
samklr /
Created Oct 11, 2019 — forked from denji/
Simple Golang HTTPS/TLS Examples

Moved to git repository:

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)

I've been working with Kafka for over 7 years. I inevitably find myself doing the same set of activities while I'm developing or working with someone else's system. Here's a set of Kafka productivity hacks for doing a few things way faster than you're probably doing them now. 🔥

Get the tools

samklr / HealthStatus.scala
Created May 23, 2019 — forked from m-wrona/HealthStatus.scala
[Akka] Service health-check
View HealthStatus.scala
import{ ActorSystem, Props }
import com.typesafe.config.Config
import com.typesafe.scalalogging.LazyLogging
import spray.can.Http
sealed class HealthStatusService(actorNames: List[String], webConfig: Config)(implicit system: ActorSystem) extends LazyLogging {
private[status] val healthCheckPath: String = webConfig.getString("status-path")
private[status] val timeoutDuration: Int = webConfig.getInt("timeout")
samklr /
Created May 20, 2019 — forked from davideicardi/
Scala AES-CTR encryption, MAC, HMAC, ... with Bouncy Castle example

Scala AES-CTR encryption Bouncy Castle example

Add the following library:

libraryDependencies += "org.bouncycastle" % "bcprov-jdk16" % "1.46"


samklr / output
Created May 16, 2019 — forked from MorganGeek/output
Install transmission on WD My Cloud
View output
FMCloud:~# wget
--2017-06-17 07:54:43--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1136 (1.1K) [text/plain]
Saving to: `'
100%[===================================================================================================================>] 1,136 --.-K/s in 0.001s
View gist:f4c36236f5ce323a6edb31021763b495

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

You can’t perform that action at this time.