Skip to content

Instantly share code, notes, and snippets.

View etspaceman's full-sized avatar

Eric Meisel etspaceman

  • SiriusXM
  • Minneapolis, MN
View GitHub Profile
@etspaceman
etspaceman / MD5.scala
Created February 27, 2023 20:34
MD5 Hashing - Scala
object MD5 {
private val initA: Int = 0x67452301
private val initB: Int = 0xefcdab89L.toInt
private val initC: Int = 0x98badcfeL.toInt
private val initD: Int = 0x10325476
private val shiftAmts: Array[Int] =
Array(7, 12, 17, 22, 5, 9, 14, 20, 4, 11, 16, 23, 6, 10, 15, 21)
private val tableT: Array[Int] = Array.ofDim(64)
for (i <- 0 until 64)
@etspaceman
etspaceman / create_kinesis_stream.sh
Last active February 16, 2023 14:58
Local Kinesis Setup w/ LocalStack
#!/usr/bin/env bash
export $(cat .env | xargs)
KINESIS_STREAM_SHARDS=${KINESIS_STREAM_SHARDS:-1}
export USE_SSL=true
awslocal kinesis create-stream --shard-count ${KINESIS_STREAM_SHARDS} \
--stream-name ${KINESIS_STREAM_NAME}