Skip to content

Instantly share code, notes, and snippets.

@instance-id
instance-id / MS_Teams_Presence_NodeRed.js
Last active July 29, 2025 06:40
UserScript/TamperMonkey - Sends HTTP request to NodeRed HTTP Listener when web based Microsoft Teams status/presence changes to enable automated actions in NodeRed/HomeAssistant
// ==UserScript==
// @name Web Based Microsoft Teams Presence To NodeRed/HomeAssistant
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Sends HTTP request to NodeRed HTTP Listener when Web based Microsoft Teams status/presence changes to enable automated actions in NodeRed/HomeAssistant
// @author instance.id
// @match https://*.teams.microsoft.us/*
// @grant none
// ==/UserScript==
@SolveSoul
SolveSoul / ceshi.ini
Created August 18, 2021 08:56
V380 Pro Activate ONVIF/RTSP
[CONST_PARAM]
rtsp = 1 ; RTSPЭ�飬0���ر� 1������
@thedroidgeek
thedroidgeek / nokia-router-cfg-tool.py
Last active November 2, 2025 06:12
Nokia/Alcatel-Lucent router backup configuration tool
#!/usr/bin/env python3
#
# Nokia/Alcatel-Lucent router backup configuration tool
#
# Features:
# - Unpack/repack .cfg files generated from the backup and restore functionnality
# in order to modify the full router configuration
# - Decrypt/encrypt the passwords/secret values present in the configuration
Originally from "https://hastebin.com/sojasolite.sql"
1-Need to modify the host user priveleges to skip typing your password with sudo
sudo visudo
hostuser ALL=(ALL) NOPASSWD:ALL
2-Mount this volume in HA container to preserve the sshkey generated from the HA container and used to execute shell commands. Key will then persist through reboot or upgrades.
-v /home/hass/docker/sshkey/.ssh:/root/.ssh
"/home/hass/docker/sshkey/.ssh" needs to be your own path
/**
* ---------------------------------------------------------
* | Esp-32/Arduino Stair Led Relay control |
* | By SchizoDuckie, ©2019 |
* | |
* | Disclaimer: |
* | I am in no way, shape or form responsible for |
* | - You setting your house on fire |
* | - Your firstborn suddenly getting autism |
* | - Your girlfriend running off with the neighbour |
@c4r-gists
c4r-gists / main.cpp
Last active April 12, 2021 19:38
Connecting a DHT11 sensor to the cloud with an ESP8266-based board
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <Cloud4RPi.h>
#include "DHT.h"
#ifndef LED_BUILTIN
#define LED_BUILTIN 2
#endif
#define DHTPIN 2 // Digital pin connected to the DHT sensor
@nbonfire
nbonfire / mysubaru.py
Created May 20, 2019 15:49
MySubaru python samples
import requests, json
from subarucreds import username,password,pin # just a "subarucreds.py" that has some variables i didn't want to share
import datetime
#login
s=requests.Session()
loginr=s.post('https://www.mysubaru.com/login', data = {'username':username,'password':password})
#should return a response 200
#Where's my subaru?
@finity69x2
finity69x2 / nws_wx_alert_rest.txt
Last active September 20, 2025 03:00
Home Assistant Configuration for Adding Weather Alerts from the US NWS using a REST Sensor
This will allow several functions including a persistent pop-up notification on your HA front end, a notification to whichever notify service you use (I’m using Pushbullet in this example), and, if you use another custom component (https://community.home-assistant.io/t/echo-devices-alexa-as-media-player-testers-needed/58639), it will also trigger an announcement to all of your Echo devices.
You next need to find either your NWS Zone ID or County ID. It is better to use both ID's here.
You can find your Zone or County ID by going to https://alerts.weather.gov/, scroll down to your state and click on the “zone list” and/or "county list" then look for the entry for your county.
Once you have your desired ID you create a sensor, replacing my id (INZ009, INC033) with yours. The ID is case sensitive!
Then when you have your ID's, enter them into the configuration below.
@woltage
woltage / getdomains.sh
Last active January 18, 2024 12:57
Skripti jolla saa Y-tunnukella kaikki firman omistamat .fi -verkkotunnukset
## Y-Tunnukseen perustuva domainejen haku (.fi)
## Esimerkki: getdomains 1093944-1 # MTV Oy
# Laita tämä .bashrc tai .zshrc
# Käyttöesimerkkejä:
# Looppaa Y-tunnuksetn kaikki domainit läpi ja tee kysely
# for i in $(getdomains 1093944-1); do echo $i && host -t cname www.$i; done
@mndrix
mndrix / sms.go
Last active June 23, 2020 17:20
SMS over IRC
// A proxy for sending/receiving SMS via IRC
//
// This code is part of our family IRC server whose code is available at
// https://gist.github.com/mndrix/7947009178e4a18c247b4bd25821661f
//
// This file won't compile by itself because it's only one file from
// my larger family server (movie hosting, Asterisk dialplan, Git
// hosting, personal assistant, etc).
//
// Copyright 2018 Michael Hendricks