Skip to content

Instantly share code, notes, and snippets.

@pve84
pve84 / sendToHA.js
Created October 5, 2022 08:16 — forked from bfritscher/sendToHA.js
node.js script to upload external data to home assistant via the websocket api
const W3CWebSocket = require("websocket").w3cwebsocket; // npm install websocket
const host = "127.0.0.1";
const port = 8123;
const protocol = "ws"; // ws or wss if ssl
// long lived access token from profile > Create Token
const access_token ="";
const entityName = "Energy Consumption";
const entityId = "energy_consumption_kwh";
@pve84
pve84 / README.md
Last active February 22, 2021 16:48 — forked from zoilomora/README.md
How to disable cloud-init in Ubuntu

How to disable cloud-init in Ubuntu

Prevent start

  • Create an empty file to prevent the service from starting

      sudo touch /etc/cloud/cloud-init.disabled
    

Uninstall

@pve84
pve84 / patch-edid.md
Created November 30, 2020 09:32 — forked from ejdyksen/patch-edid.md
A script to fix EDID problems on external monitors in macOS

patch-edid.rb

A script to fix EDID problems on external monitors in macOS.

Instructions

  1. Connect only the problem display.

  2. Create this directory structure (if it doesn't already exist):

"""
configuration.yaml
sensor:
- platform: zeversolar_inverter
host: IP_ADDRESS
port: 80
scan_interval: 10
resources:
- elecsolar
# This script will clean a Azure API Management resource.
# Be sure to run Connect-AzureRmAccount before running this script!
# Written by: Peter van Ekeren
# Date: 3-10-2018
param (
[bool]$DryRun = $false,
[bool]$RemoveProducts = $true,
[bool]$RemoveApis = $true,
[bool]$RemoveProperties = $true,
[Parameter(Mandatory=$true)][string]$ServiceName,