Skip to content

Instantly share code, notes, and snippets.

View Stefku's full-sized avatar

Stefan Zeller Stefku

  • Swiss Federal Railways
  • Bern, Switzerland
View GitHub Profile
@Stefku
Stefku / Product.java
Created November 20, 2018 16:04
Attempt to Specification Pattern with encapsulation
package ch.sbb.touri.zusatzinfo;
interface Queryable {
boolean satisfies(Querying querying);
}
interface Querying {
boolean calculateWithValue(long value);
}
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="lib/style.css">
<script src="lib/script.js"></script>
</head>
<body>
@Stefku
Stefku / README.md
Last active August 29, 2015 14:03
Marey’s Trains III
@Stefku
Stefku / README.md
Last active August 29, 2015 14:02
Text diffing multiple browser tabs

##Usage Select a text and set it to left or right. Then press compare to compare left and right.

Note: This example uses localStorage. That means you can use select text and diff in other instances of a window. And it means that example does not work on ancient browsers.

Used library for diffing https://github.com/kpdecker/jsdiff.