Skip to content

Instantly share code, notes, and snippets.

View jzaccone's full-sized avatar

John Zaccone jzaccone

  • Richmond, VA
View GitHub Profile
@alexellis
alexellis / SwarmModeNetworking.md
Last active June 28, 2017 18:16
Mesh networking tester for Swarm Mode

Here's a quick tester for Swarm Mode that will work everywhere..

$ docker service create --name nginx1 -p 80:80 --mode=global --mount source=/etc/hostname,target=/usr/share/nginx/html/index.html,type=bind,ro nginx

You effectively bind mount the hostname as the index.html page meaning you can see the round-robin / mesh networking in action.

@logcat
logcat / Locale Activity Rule
Created July 15, 2015 06:50
Android activity role to change and test different locales
public static final Locale FRENCH_LOCALE = new Locale("fr", "FR");
@Rule
public ActivityTestRule<SplashScreenActivity> activityRule = new ActivityTestRule(SplashScreenActivity.class, true, true) {
@Override
protected void beforeActivityLaunched() {
super.beforeActivityLaunched();
Locale.setDefault(FRENCH_LOCALE);