Skip to content

Instantly share code, notes, and snippets.

@TScalzott
TScalzott / Send-vSphereAlarms.ps1
Created September 1, 2019 15:11
Post active vSphere alarms to a Microsoft Teams channel
<#
.SYNOPSIS
Post active vSphere alarms to a Microsoft Teams channel.
.DESCRIPTION
Connect to the specified vSphere vCenter, query for all active alarms, and post those
as a card to Microsoft Teams via a Webhook.
The card will contain one section per alarm with a few facts: the cluster involved,
the date and time of the alarm, the alarm status (yellow/red/etc), and whether
@emily-pesce
emily-pesce / NestScript.gs
Last active June 26, 2023 07:12
Nest Thermostat Data Collection in Google Sheets for Upstairs/Downstairs Setups
// CREDIT TO BEEZLY for a lot of this, I just adapted it a bit and added more documentation :)
// --> BEEZLY's work: https://gist.github.com/beezly/9b2de3749d687fdbff3f
// To make this work:
// 1) create a new Google Sheet (name it whatever you'd like, e.g., "Nest Data")
// 2) on the menu bar click Tools -> Script Editor... to open Script Editor (new window)
// 3) in Script Editor delete all the default scripts/files, and create a new one (I called it "NestScript.gs")
// 4) cut and paste this entire file into NestScript.gs, then SAVE THE SCRIPT
// 5) on the menu bar click Publish -> Deploy as Web App
// select "Execute the App as Me"
@beezly
beezly / gist:9b2de3749d687fdbff3f
Last active April 19, 2023 13:14
Log Nest temperatures into a Google Spreadsheet. Update the username and password values and create a resource trigger to call "getData" at regular intervals.
function performLogin(email, password) {
var payload = {
"username" : email,
"password" : password
};
var options = {
"method" : "post",
"payload" : payload
};