Skip to content

Instantly share code, notes, and snippets.

@joeheyming
joeheyming / garagerelay
Created June 16, 2018 19:30
Garage door init
#! /bin/bash
# /etc/init.d/garagerelay
# Carry out specific functions when asked to by the system
case "$1" in
start)
echo "Starting Relay"
/usr/local/bin/gpio write 7 0
/usr/local/bin/gpio mode 7 out
@joeheyming
joeheyming / server.js
Created June 16, 2018 19:29
garage door app
//Requires
const express = require('express');
const app = express();
const path = require('path');
const chalk = require('chalk');
const { exec } = require('child_process');
const morgan = require('morgan');
//Static Routes
app.use('/dist', express.static(path.join(__dirname, 'dist')));