Skip to content

Instantly share code, notes, and snippets.

View biacz's full-sized avatar

Nikolas Beutler biacz

View GitHub Profile
@biacz
biacz / check_pir.ino
Last active March 13, 2017 11:53
check_pir
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
// WiFi Settings
#define wifi_ssid "ssid"
#define wifi_password "pw"
// MQTT Settings
#define mqtt_server "192.168.0.27"
//include all libraries
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <ESP8266httpUpdate.h>
#include <PubSubClient.h>
#include <RCSwitch.h>
#include <fauxmoESP.h>
//basic defines
#define MQTT_VERSION MQTT_VERSION_3_1_1
$brokers = "mapvasdfp02", "natviasdf2", "stpvasdf02"
$vcenters = "mapvasdfp02", "natasdf2", "stasdfp02"
#$creds = Get-Credential -Message "Please enter your credentials"
"Connecting to vCenter Servers"
connect-viserver $vcenters -Credential $creds
Set-StrictMode -Version 2.0
@biacz
biacz / .ps1
Last active November 6, 2015 14:03
$report = @()
foreach ($vm in $view) {
foreach ($vc in $vcenter) {
if($vm.Name -eq $vc.Name) {
$entry = [PSCustomObject] @{
Name = $vm.Name
CPU = $vc.summary.config.NumCpu
Memory = $vc.summary.config.MemorySizeMB
}}