Skip to content

Instantly share code, notes, and snippets.

View williamdenton's full-sized avatar

William Denton williamdenton

View GitHub Profile
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#define STASSID ""
#define STAPSK ""
#define APIKEY ""
#define LED_ON LOW
#define LED_OFF HIGH
@williamdenton
williamdenton / GarageDoor.ino
Created July 17, 2019 08:20
HomebridgeSetup for Garage Door
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#define STASSID ""
#define STAPSK ""
#define APIKEY ""
#define LED_ON LOW
#define LED_OFF HIGH
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Newtonsoft.Json;
using ShellProgressBar;
@williamdenton
williamdenton / cloudflare-update-record.sh
Created November 26, 2016 23:12
update cloud flare DNS with home IP
#!/bin/bash
#https://gist.github.com/benkulbertis/fff10759c2391b6618dd
# Place at:
# /usr/local/bin/cf-ddns.sh
# run `crontab -e` and add next line:
# 0 */5 * * * * /usr/local/bin/cf-ddns.sh >/dev/null 2>&1
# CHANGE THESE
@williamdenton
williamdenton / commit-msg
Last active August 17, 2021 13:08
Git hooks
#!/bin/sh
commit_regex='^(PP-[0-9]+|fixup!)'
error_msg="Aborting commit. Your commit message is missing a JIRA ticket ('PP-1234')"
if ! grep -iqE "$commit_regex" "$1";
then
echo "$error_msg" >&2
exit 1