Skip to content

Instantly share code, notes, and snippets.

View awill1988's full-sized avatar

Adam T. Williams awill1988

  • Bozeman, Montana
  • 05:14 (UTC -06:00)
View GitHub Profile

This is a demo of how to talk between programs running on a Mac, and programs running under Docker on a VM on the same Mac as installed by Docker Toolbox.

Just add a route to your containers using the VM as the gateway. Demo:

  • on the mac, run Docker Quickstart Terminal from the latest Docker Toolbox. This launches the virtualbox VM, and configures your shell
  • in that shell, figure out the IP address of the VM:
mak@crab 493 ~ $ docker-machine inspect default -f '{{ .Driver.IPAddress }} '
192.168.99.100 
@andreburgaud
andreburgaud / webcrypto.js
Created November 16, 2015 04:29
Basic example of Web Crypto (keygen/encrypt/decrypt) using symmetric encryption with AES Gallois Counter Mode algorithm.
// Resources:
// https://github.com/diafygi/webcrypto-examples
// https://developer.mozilla.org/en-US/docs/Web/API/CryptoKey
// http://blog.engelke.com/tag/webcrypto/
// Tested in Firefox Developer Edition
function strToArrayBuffer(str) {
var buf = new ArrayBuffer(str.length * 2);
var bufView = new Uint16Array(buf);
for (var i = 0, strLen = str.length; i < strLen; i++) {