Skip to content

Instantly share code, notes, and snippets.

@koenkarsten
koenkarsten / Server.scala
Last active April 24, 2024 13:37
A simple TCP Socket Server made with Scala + Akka IO
import java.net.InetSocketAddress
import akka.actor.{ActorSystem, Props, Actor}
import akka.io.{Tcp, IO}
import akka.io.Tcp._
import akka.util.ByteString
class TCPConnectionManager(address: String, port: Int) extends Actor {
import context.system
IO(Tcp) ! Bind(self, new InetSocketAddress(address, port))
@kottenator
kottenator / simple-pagination.js
Created July 13, 2015 20:44
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;
@digitaljhelms
digitaljhelms / gist:4287848
Last active July 19, 2024 03:32
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch