Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Gadi Eichhorn gadieichhorn

🏠
Working from home
View GitHub Profile
View message
public interface Message {
@NonNull UUID getTrace();
}
View messagebus
public interface MessageBus {
void publish(Message message);
void subscribe(Observer<Message> observer);
}
View OSGi BND test Rule - DRY
import lombok.Builder;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.junit.rules.ExternalResource;
import org.osgi.framework.BundleContext;
import org.osgi.util.tracker.ServiceTracker;
import static org.junit.Assert.assertNotNull;
@Slf4j
View Setting up Docker Machine on Raspberry PI.md

#Setting up Docker Machine on Raspberry PI

  1. SSH into the pi and install docker with curl -sSL https://get.docker.com | sh (If we let Machine try to install the Docker daemon it will fail.)
  2. Change the OS's ID so Docker Machine won't throw errors. sudo nano /etc/os-release and change the line that says ID=raspbian to ID=debian
  3. From a new terminal window run docker-machine create --driver generic --generic-ip-address YOUR-PIS-IP --generic-ssh-key ~/.ssh/id_rsa --generic-ssh-user pi --engine-storage-driver overlay2 MACHINE-NAME
@gadieichhorn
gadieichhorn / pom-all.xml
Created Mar 9, 2017
Update version of projects
View pom-all.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.effectus</groupId>
<artifactId>effectus</artifactId>
<version>0.0.13-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Effectus.io</name>
@gadieichhorn
gadieichhorn / KubernetesOnWindows.md
Created Mar 2, 2017 — forked from AdamLJohnson/KubernetesOnWindows.md
How to get Kubernetes running on Windows 10
View KubernetesOnWindows.md

Kubernetes On Windows

Early in August 2016 Microsoft released the Windows 10 Anniversary Update. There were a number of changes, but the one that got me to actually take the time to install the update was "Bash on Ubuntu on Windows". This feature would install Ubuntu Linux without the kernel. It would run linux in user-mode. Linux would run the commands while Windows does all the work/processing.

For an upcoming project I needed to get Kubernetes running. Being as Kubernetes is not able to be run in Windows the normally accepted way to procees is to create a virtual Linux box and run it from there. I wanted to see if Kubernetes would run in Bash on Ubuntu on Windows.

This is how I got it to work:

Install the Windows 10 Anniversary Update

View DI
Class Service {
// call some external API
// the implementation can very without effecting the consumers
// it can be mocked for testing
string getData() { return string }
}