Instantly share code, notes, and snippets.

View Instructions.txt
First: Close all other applications, so that they don't interfere with the benchmark.
Second: Make sure that your computer is adequately cooled during the benchmark so it doesn't start thermal throttling.
Third: clone https://github.com/viktorklang/scala-futures/
Fourth: git checkout wip-optimizations-√
Fifth: start sbt
View build.sbt
scalaVersion := "2.11.8"
scalaOrganization := "org.typelevel"
libraryDependencies ++= Seq(
"org.typelevel" %% "cats" % "0.9.0",
"org.atnos" %% "eff" % "4.0.0"
)
addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.9.3")
View StreamDeadlock.scala
object StreamDeadlock {
def main(args: Array[String]): Unit = {
import akka.actor._
import akka.stream._
import akka.stream.scaladsl._
import scala.concurrent._
implicit val system = ActorSystem()
val noFusingMaterializer = ActorMaterializer(ActorMaterializerSettings(system).withAutoFusing(false))
View BenchIt.scala
package ai
/**
* Created by HamsterofDeath on 3/14/2017.
* Polished by √ on 3/14/2017
*/
import java.text.DecimalFormat
import scala.util.Random
View keybase.md

Keybase proof

I hereby claim:

  • I am viktorklang on github.
  • I am viktorklang (https://keybase.io/viktorklang) on keybase.
  • I have a public key ASD8bMnlRJBBEHVUgA0_fuzExfoV__wn6K6teoI6d3QDKwo

To claim this, I am signing this object:

View exclude_targetdirs.sh
#WARNING: Use at your own risk. No warranties expressed or implied. YMMV. Drive responsibly. Eat healthy.
#First, `cd` into the parent dir for all of your `sbt`/`maven` projects (I assume you have one of those)
find "$(cd ..; pwd)" -type d -name "target" -print0 | sudo xargs -0 tmutil addexclusion -p
View reclaimWindows10.ps1
##########
# Win10 Initial Setup Script
# Author: Disassembler <disassembler@dasm.cz>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
View restart_audio.sh
#Use at your own risk. No warranties expressed or implied. YMMV. Drive responsibly. Eat healthy.
#for ZSH, I typically put these in my .zshrc
function restart_audio() {
command sudo killall coreaudiod &&
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist &&
sudo launchctl load /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist &&
echo 'Audio daemon restarted'
}
View unification.scala
scala> import akka.stream._
import akka.stream._
scala> import akka.stream.scaladsl._
import akka.stream.scaladsl._
scala> import akka.stream.stage._
import akka.stream.stage._
scala> import scala.language.higherKinds
View service-checklist.md

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?