Skip to content

Instantly share code, notes, and snippets.

@BatslyAdams
BatslyAdams / app.js
Created May 12, 2017 22:25
Dog Parker Example Code
'use strict';
var clientFromConnectionString = require('azure-iot-device-http').clientFromConnectionString;
var Message = require('azure-iot-device').Message;
var connectionString = '<redacted>'
var client = clientFromConnectionString(connectionString);
var ip = require("ip");
var mraa = require('mraa');
var dog_present = new mraa.Gpio(1);
var door_open = new mraa.Gpio(2);
@BatslyAdams
BatslyAdams / Dockerfile
Created March 8, 2017 17:06
Java environment in Windows Server Core setup using PowerShell - DevOps Hackathon
# Starting Dockerfile for a Java based project in Windows Server Core with JDK integrity check
FROM microsoft/windowsservercore
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
WORKDIR c:/setup
# Set variables for OpenJDK pull
ENV JAVA_VERSION="1.8.0.111-3" `
JAVA_ZIP_VERSION="1.8.0-openjdk-1.8.0.111-3.b15" `
JAVA_SHA256="e080371bf57536668416157660e05d95fe04db15da36234d32bda8e301bb0454" `