Skip to content

Instantly share code, notes, and snippets.

Mikael Högqvist Tabor mkhq

Block or report user

Report or block mkhq

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mkhq /
Created Oct 28, 2016 — forked from trentmswanson/
Linux bash script to partition and format all data disks in azure
# An set of disks to ignore from partitioning and formatting
# Base directory to hold the data* files
usage() {
echo "Usage: $(basename $0) <new disk>"
mkhq / kafka
Last active Feb 6, 2018 — forked from iandow/kafka
Simple Kafka Ubuntu init.d Startup Script
View kafka
# See how we were called.
case "$1" in
# Start daemon.
echo "Starting Zookeeper";
mkhq / primary.scala
Created Apr 10, 2013
Primary election using zookeeper
View primary.scala
import com.twitter.zookeeper.ZooKeeperClient
import org.apache.zookeeper.CreateMode
import java.util.UUID
object PrimaryBootstrap {
def main(args:Array[String]) {
val path = args(0)
val zk = new ZooKeeperClient("localhost:2181")
zk.create(path, null, CreateMode.PERSISTENT)
mkhq / akka remote registered actors talking to each other
Created Feb 15, 2011
two remote actors, register one send ping and reply with pong
View akka remote registered actors talking to each other
import akka.remoteinterface.RemoteSupport
import akka.remote.netty.NettyRemoteSupport
import org.specs._
import java.util.concurrent.{CountDownLatch, TimeUnit}
object ServiceState {
View non-exhaustive match in actor
import org.specs._
object ActorMatchSpec extends Specification {
"actor match" should {
"match non-exhaustive" in {
View akka send actor ref test
package test
import akka.remote.{RemoteClient, RemoteNode, RemoteServer}
import{Actor, ActorRef}
import akka.serialization.RemoteActorSerialization
import org.specs._
import java.util.concurrent.{CountDownLatch, TimeUnit}
You can’t perform that action at this time.