Skip to content

Instantly share code, notes, and snippets.

View opyate's full-sized avatar
🐠
Fishing.

Juan M Uys opyate

🐠
Fishing.
View GitHub Profile
@opyate
opyate / ConsistentHash.scala
Last active July 18, 2022 06:33
Consistent Hashing in Scala
// scalac -unchecked -optimise ConsistentHash.scala && scala CHApp
import scala.collection.immutable.LinearSeq
import java.util.{TreeMap => JTreeMap}
import java.util.{SortedMap => JSortedMap}
/**
* Inspired by http://www.lexemetech.com/2007/11/consistent-hashing.html
*/
@opyate
opyate / Logback Redis appender simple client, and output
Created October 17, 2010 02:40
Shows a few basic classes which log, and the Redis key/values it generates.
Dependency
==========
http://github.com/downloads/xetorthio/jedis/jedis-1.3.0.jar/qr_code
Client
=========
logback-test.xml