Skip to content

Instantly share code, notes, and snippets.

View notmayo's full-sized avatar

Geoffrey Mayo notmayo

  • SECRET ORGANIZATION
  • USA
  • 07:18 - 5h behind
View GitHub Profile
description: "Update with your device and entity IDs"
mode: single
trigger:
- platform: time_pattern
hours: "*"
id: Watering
- platform: device
type: turned_on
device_id: 23ddd11050cc1ece59ef498c9317e672
entity_id: 46341310abd22c1d7b3c6a816ae69bfe
@notmayo
notmayo / mac_smartcard.sh
Last active March 18, 2024 19:37
Install DoD Root Certs on MacOS - 2024
#!/bin/bash
# Set the directory where certificates will be stored
CERT_DIR="$HOME/DoDCertificates"
# Create the directory if it does not exist
mkdir -p "$CERT_DIR"
# Change to the directory
cd "$CERT_DIR"
@notmayo
notmayo / si-smartplug-model-70011.yaml
Created December 10, 2023 14:45
Sharper Image Smart Wifi Plug US Socket Model 70011 ESPHome YAML
esphome:
name: si-smartplug-model-70011
friendly_name: si-smartplug-model-70011
esp8266:
board: d1_mini
early_pin_init: false # Prevent the physical relay flipping on reboot.
api:
ota:
@notmayo
notmayo / Powershell-NetworkConnectivityPingScript-NoClients.txt.ps1
Last active February 28, 2019 16:16
Ping status script that does not require a separate txt file.
set-executionpolicy unrestricted
clear
while($true)
{
$date = Get-Date
$sleep = 10
$Tab = [char]9
Write-Host -Fore "Blue" "Ping status $date"
Write-Output -----
@notmayo
notmayo / Batch-SetLANAdapterAsStaticIP.bat
Created February 27, 2019 16:30
Set Local Area Connection as a static IP. Requires runas Administrator.
netsh int ip set address name="Local Area connection" static 198.220.115.3 255.255.255.0
pause
@notmayo
notmayo / Batch-SetLANAdapterAsDHCP.bat
Created February 27, 2019 16:29
Sets Local Area Connection as DHCP. Requires runas Administrator.
netsh int ip set address "Local Area connection" source=dhcp
pause
@notmayo
notmayo / Powershell-NetworkConnectivityPingScript.ps1
Last active February 27, 2019 16:28
Create a clients.txt file with one ip/hostname per line
set-executionpolicy unrestricted
clear
while($true)
{
$PingMachines = Gc "clients.txt"
ForEach($MachineName In $PingMachines)
{$PingStatus = Gwmi Win32_PingStatus -Filter "Address = '$MachineName'" |
Select-Object StatusCode
If ($PingStatus.StatusCode -eq 0)
{Write-Host $MachineName -Fore "Green"}