Skip to content

Instantly share code, notes, and snippets.

Originally:
https://gist.github.com/7565976a89d5da1511ce
Hi Donald (and Martin),
Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I
appreciate the tone. This is a Yegge-long response, but given that you and
Martin are the two people best-situated to do anything about this, I'd rather
err on the side of giving you too much to think about. I realize I'm being very
critical of something in which you've invested a great deal (both financially
@nobeh
nobeh / Killer.java
Last active September 7, 2015 18:53
Trigger Unix OOM Killer
public class Killer {
static final long T0 = System.nanoTime();
static final java.util.Random R = new java.util.Random(System.nanoTime());
static java.util.logging.Logger LOGGER;
static String ID;
static class Data { // 8 bytes header
long p1; // 8 bytes
@nobeh
nobeh / OurApartment
Created October 5, 2014 16:02
Details of our apartment in Almere
# Welcome to our apartment!
In the following, we have tried our best to provide all the necessary details that you may need as our guest. Thanks and enjoy!
# Would you please ...
* We have prepare a small rounded box for your breakfast. It's in the fridge. Don't forget that!
* There are also other delights around and labelled. Enjoy!
* When you enter the building, ensure the door closes after you.
* Close the balcony door during night, when you are sleep or when you want to leave the apartment.
@nobeh
nobeh / java8-lambda.tex
Created October 10, 2013 12:11
Java 8 Lambda Expression Language Syntax -- Reference: http://cr.openjdk.java.net/~dlsmith/jsr335-0.6.1/B.html
\begin{figure}[t]
\begin{align}
L ::=& \; L_P \; \to \; \{ \; L_B \; \} \\
L_P ::=& \; I \; | \; ( \: P_{\mathsf{list}}^? \: ) \; | \; ( \: P_{\mathsf{list}}^i \: ) \\
P_{\mathsf{list}}^i ::=& \; I \; | \; P_{\mathsf{list}}^i \; , \; I \\
L_B ::=& \; E \; | \; K \\
P_{\mathsf{list}} ::=& \; P_{\mathsf{last}} \; | \; P \; , \; P_{\mathsf{last}} \\
P ::=& \; P_{\mathsf{single}} \; | \; P \; , \; P_{\mathsf{single}} \\
P_{\mathsf{single}} ::=& \; F^? \; T \; I \\
P_{\mathsf{last}} ::=& \; F^? \; T... \; I \; | \; P_{\mathsf{single}} \\
@nobeh
nobeh / PrimeSieves.scala
Created February 5, 2012 14:53
Prime sieves with Scala Actors
import scala.actors.Actor
case class sieve(n: Int)
case class finish(n: Int)
class Sieve(val p: Int) extends Actor {
var next: Sieve = null
def _sieve(n: Int) = {
@nobeh
nobeh / AkkaPrimeSieves.scala
Created February 5, 2012 14:52
Prime sieves in Scala with Akka Actors
import akka.actor._
import akka.actor.Actor._
case class sieve(n: Int)
case class finish(n: Int)
class SieveAkka(val p: Int) extends Actor {
var next: ActorRef = null