Skip to content

Instantly share code, notes, and snippets.

View MartinSeeler's full-sized avatar

Martin Seeler MartinSeeler

View GitHub Profile
@nicolewhite
nicolewhite / file.md
Last active April 7, 2019 16:34
Datasets for Graph Hack.

Datasets for Graph Hack 2014.

All stores are Neo4j 2.1.3.

Transportation

What is related, and how?

Flight	ORIGIN Airport

Preview build: Container grouping and stack composition

NOTE: this is out of date - refer to moby/moby#9694

Here is a preview build of two new features we’re working on concurrently: container grouping (docker groups) and stack composition (docker up). Together, they will eventually form a complete replacement for Fig.

@s-panferov
s-panferov / option.ts
Created November 30, 2014 12:15
Option and Result types from Rust in TypeScript
interface Option<T> {
map <U>(fn: (a: T) => U): Option<U>;
isSome(): boolean;
isNone(): boolean;
isSomeAnd(fn: (a: T) => boolean): boolean;
isNoneAnd(fn: () => boolean): boolean;
unwrap(): T;
unwrapOr(def: T): T;
unwrapOrElse(f: () => T): T;
map<U>(f: (a: T) => U): Option<U>;
@jnauber
jnauber / dockercon2014
Created December 9, 2014 18:31
What's up in Dockerland
What's Up in Dockerland?
dockercon Europe 2014
Ankündigungen
- Docker
- Docker Machine
- "Machine makes it really easy to create Docker hosts on local hypervisors and cloud providers. It creates servers, installs Docker on them, then configures the Docker client to talk to them."
- Kapselt unterschiedliche "Driver" und bietet ein einheitliches Interface um die Docker-Ready Maschinen zu deployen
@jexp
jexp / cpu_usage.sh
Created December 14, 2014 03:55
little tool to compute ongoing CPU usage for a process, like top
# thank you http://unix.stackexchange.com/questions/58539/top-and-ps-not-showing-the-same-cpu-result
PID=${1-$PID}
SLEEP=${2-${SLEEP-10}}
while [ true ]; do
t=`ps -h -p $PID -o cputime,etimes`
new=`echo $t | awk '{split($1, a,":"); print a[1]*3600+a[2]*60+a[3],$2;}'`
# echo "t: $t last: $last new: $new"
echo "$last $new" | awk '{print $4, 100.0*($3-$1) / ($4-$2)}'
last=$new
@knutwalker
knutwalker / SlidingWindow.java
Last active August 29, 2015 14:15
slidingWindow in RxJava
import fj.P;
import fj.P2;
import rx.Observable;
import rx.Subscriber;
public final class SlidingWindow {
public static Observable<P2<Integer, Integer>> viaScan(final Observable<Integer> integers) {
// allocate new Integer outside of integer cache range, so that it can be compared using `==`
// noinspection UnnecessaryBoxing
@knutwalker
knutwalker / TimersTest.java
Last active August 29, 2015 14:15
Usage of Rx TestScheduler
import rx.Observable;
import rx.Scheduler;
import rx.schedulers.Schedulers;
import rx.schedulers.TestScheduler;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
public final class TimersTest {
@knutwalker
knutwalker / J.scala
Created February 17, 2015 16:47
Demo json struff with argonaut and spray
package oanda
import argonaut._, Argonaut._, Shapeless._
import spray.json._, DefaultJsonProtocol._
import scala.util.Try
object J {
sealed trait MyMessages
@romainl
romainl / _rnb.md
Last active June 26, 2025 17:42
RNB, a Vim colorscheme template
@mlvea
mlvea / currencies.json
Created March 17, 2015 16:07
Common currencies as an array
[
{
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},