This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from typing import Iterable, Union, Any | |
# freq: frequency in Hz | |
# zerolen: length of space bit in μs | |
# onelen: length of mark bit in μs | |
# repeats: number of times to repeat sequence | |
# pause: time to wait in μs between sequences | |
# bits: string of ones and zeros to represent sequence |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
substitutions: | |
devicename: magtag | |
upper_devicename: Magtag | |
esphome: | |
name: magtag | |
platform: esp32 | |
board: esp32dev | |
platformio_options: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mqtt = require('mqtt'); | |
var HOST = '192.168.43.10'; | |
var client = mqtt.connect("mqtt:\/\/" + HOST, { port: 1883 }); | |
client.on('connect', function () { | |
console.log("Connected to " + HOST); | |
client.subscribe('hermes/intent/#'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('es6-promise').polyfill(); | |
var hue = require("node-hue-api"), | |
HueApi = hue.HueApi, | |
lightState = hue.lightState; | |
var mqtt = require('mqtt'); | |
var schedule = require('node-schedule'); | |
// Exit once an hour to force a re-read of the Hue lights list | |
var j = schedule.scheduleJob(new Date((new Date()).getTime()+3600000), function() { | |
console.log("[" + new Date() + "] " + "Exiting after pre-set delay."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[Parameter(Mandatory=$true, HelpMessage="Location of the Git repository to update")] | |
[string]$SourceLocation | |
) | |
# Test the source code location parameter | |
if ((Test-Path -Path $SourceLocation -PathType Container) -eq $false) { | |
Write-Host "The specified source code location is not valid" -ForegroundColor Red | |
exit 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Written by Peter O. | |
// Any copyright to this work is released to the Public Domain. | |
// https://creativecommons.org/publicdomain/zero/1.0/ | |
// | |
// | |
// | |
using System; | |
using System.Collections.Generic; | |
using System.Globalization; |