Now that we live in the Big Data, Web 3.14159 era, lots of people want to build databases that are too big to fit on a single machine. But there's a problem in the form of the CAP theorem, which states that if your network ever partitions (a machine goes down, or part of the network loses its connection to the rest) then you can keep consistency (all machines return the same answer to
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.sys.process._ | |
import java.io._ | |
// Run a Process, return the output as a String | |
Process("echo foo") !! | |
// Run a Process, pipe in some input, and return the output as a String | |
Process("cat") #< (new ByteArrayInputStream("foobar".getBytes("UTF-8"))) !! | |
// Run a Process, pipe in some input, and pipe the output to a Array[Byte] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.promindis.game.snake.stm | |
import akka.actor.{ActorRef, Actor} | |
import java.awt.{Dimension, Graphics2D} | |
import java.awt.event.{ActionEvent, ActionListener} | |
import swing._ | |
import swing.Dialog._ | |
import swing.event.Key._ | |
import swing.event.KeyPressed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
control_c() { | |
if $cygwin; then rm "$USERPROFILE"/play.boot.properties; fi | |
exit 1 | |
} | |
case "`uname`" in | |
CYGWIN*) cygwin=true;; | |
esac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function help { | |
echo "Searches path for .class files compiled from specified Scala or Java class" | |
echo "Usage: $(basename $0) fileName [className]" | |
echo " -c classpath; if not specified then all classes under target/scala-* are searched" | |
echo " -e Exact match required for fileName, or className if specified" | |
echo " -s Show javap decompilation output" | |
exit -1 | |
} |
Here at eSpark Learning, we use Jekyll to host our marketing site, https://www.esparklearning.com. Within eSpark Engineering, we love automated testing - most of our codebases require a passing test suite for all changes. As we add more javascript to our Jekyll site, we wanted to add a test framework that would give us real world tests - testing that the HTML was valid was no longer enough.
To create real world acceptance tests for our site, we used a few technologies we were familiar with:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Pandoc Lua filter to include other Markdown files | |
--- | |
--- Usage: Use a special code block with class `include` to | |
--- include Markdown files. Each code line is treated as the | |
--- filename of a Markdown file, parsed as Markdown, and | |
--- included. Metadata from include files is discarded. | |
--- | |
--- Example: | |
--- | |
--- ``` {.include} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install xfce4 xfce4-terminal xubuntu-desktop |