Skip to content

Instantly share code, notes, and snippets.

View demo_deepsleep.yaml
substitutions:
device_name: demo_deepsleep
friendly_name: Demo Deep Sleep
## Board config
esphome:
name: ${device_name}
platform: ESP32
board: m5stack-core-esp32
View hot_plants.yaml
alias: Hot plants
trigger:
- platform: sun
event: sunset
offset: '-02:00:00'
condition:
- condition: and
conditions:
- condition: numeric_state
entity_id: sensor.south_yarra_temp_max_0
@tathamoddie
tathamoddie / lightning.yaml
Last active Jan 5, 2021
AS3935 and ESPHome config
View lightning.yaml
substitutions:
device_name: lightning_detector
friendly_name: Lightning
## Board config
esphome:
name: ${device_name}
platform: ESP32
board: m5stack-core-esp32
@tathamoddie
tathamoddie / demo2.yaml
Created Aug 30, 2020
ESPHome demo config for M5Stack Atom Lite
View demo2.yaml
substitutions:
device_name: demo2
friendly_name: Demo 2
## Boilerplate
esphome:
name: ${device_name}
platform: ESP32
board: m5stack-core-esp32
View automations.yaml
- alias: Notify when gate buzzing
trigger:
- entity_id: binary_sensor.gate_buzzer
from: 'off'
platform: state
to: 'on'
condition: []
action:
- service: notify.everyone
data:
View Export-AadHeirarchy.ps1
[CmdletBinding()]
param
(
[Parameter()]
[String[]]
$StartingUsers,
[Parameter()]
[bool]
$EnabledUsersOnly = $true
@tathamoddie
tathamoddie / consent-self-test.ps1
Created Jan 29, 2018
AAD app consent self-test
View consent-self-test.ps1
@tathamoddie
tathamoddie / configuration.xml
Created Mar 22, 2017
Office Deployment Tool channel configuration
View configuration.xml
<!-- Office 365 client configuration file sample. To be used for Office 365 ProPlus 2016 apps,
Office 365 Business 2016 apps, Project Pro for Office 365 and Visio Pro for Office 365.
For detailed information regarding configuration options visit: http://aka.ms/ODT.
To use the configuration file be sure to remove the comments
For Office 365 client apps (verion 2013) you will need to use the 2013 version of the
Office Deployment Tool which can be downloaded from http://aka.ms/ODT2013
The following sample allows you to download and install Office 365 ProPlus 2016 apps
@tathamoddie
tathamoddie / Migrate-ActiveAcpUsers.ps1
Created Oct 3, 2016
Skype for Business: migrate only active ACP users to the Microsoft Bridge
View Migrate-ActiveAcpUsers.ps1
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[Parameter(Mandatory=$True)]
[PSCredential]$Credential,
[int]$BatchSize = 200
)
Import-Module 'C:\Program Files\Common Files\Skype for Business Online\Modules\SkypeOnlineConnector'
$skypeSession = New-CsOnlineSession -Credential $cred
@tathamoddie
tathamoddie / gist:b35a8f43e81a1cfd2383
Created Jun 19, 2014
window.clockSync.clientTimeAheadOfServerInMilliseconds
View gist:b35a8f43e81a1cfd2383
<script src="~/Scripts/moment.min.js"></script>
<script>
(function() {
var clientNow = moment();
var serverNow = moment('@(DateTimeOffset.UtcNow.ToString("o"))');
var diff = clientNow.diff(serverNow);
if (!!window.performance && !!window.performance.timing) {
var responseStartToNow = new Date().valueOf() - window.performance.timing.responseStart;
diff -= responseStartToNow;
}