Skip to content

Instantly share code, notes, and snippets.

View dbuschman7's full-sized avatar

David Buschman dbuschman7

  • Lone Star State
View GitHub Profile
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.must.Matchers
import java.util.concurrent.atomic.{AtomicBoolean, AtomicLong}
import scala.concurrent.{ExecutionContext, ExecutionContextExecutor, Future}
import scala.concurrent.duration._
object Timer {
@dbuschman7
dbuschman7 / SystemPropertiesParsing.scala
Created February 24, 2023 01:52
Parse Java system properties to extract jars from the class path
//> using scala "2.13"
//> using platform "jvm"
//> using lib "com.rabbitmq:amqp-client:5.16.0"
//> using lib "com.typesafe.play::play-json:2.7.4"
import play.api.libs.json.{Json, OFormat}
object SystemProperties extends App {
@dbuschman7
dbuschman7 / docker-compose.yaml
Created August 2, 2019 04:12
docker-compose.yaml
version: '2'
services:
#
# ZooKeeper Service
# ############################
zookeeper:
image: wurstmeister/zookeeper:3.4.6
container_name: zookeeper
restart: always
#! /bin/bash
#
# BASIC
# ###################
export EDITOR=/usr/bin/vim
export SHELL=/bin/bash
export PAGER=less
# erase duplicated entries, ignore entries that are duplicates or begin with spaces
@dbuschman7
dbuschman7 / Usage.sh
Last active May 23, 2018 16:22
MacOS version handling
$ listJdks
Matching Java Virtual Machines (3):
1.8.0_151, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
1.8.0_77, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home
1.7.0_80, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
$ showJdk
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
package me.lightspeed7.dsug.streams
import org.scalatest.FunSuite
import org.scalatest.Matchers._
class NodeSolutionTest extends FunSuite {
def function(in: Seq[String]): Map[String, Int] = {
in.flatMap(_.split(" "))
.groupBy(identity)
package io.timeli.test
import scala.util.matching.Regex
trait Semigroup[A] {
def append(x: A)(y: A): A
}
object Semigroup {
implicit def listSemigroup[A]: Semigroup[List[A]] =
[color]
ui = auto
[color "status"]
header = cyan bold
branch = green
nobranch = red reverse white
added = green
changed = yellow
untracked = red
deleted = red bold
# Public account
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/github_buschman7
echo "Begin Profile Setup ...."
echo "==========================================="
#Colors
RED="\e[31m"
YELLOW="\e[0;33m"
GREEN="\e[0;32m"
OCHRE="\e[38;5;95m"
BLUE="\e[0;34m"
WHITE="\e[0;37m"