Skip to content

Instantly share code, notes, and snippets.

View LVLAaron's full-sized avatar

LVLAaron LVLAaron

View GitHub Profile
// name: HVAC_Thermostat.ino
// -------------LIBRARIES----------------
#include <Wire.h> // Protocol to communicate with I2C devices
#include <Adafruit_MCP23017.h> // LCD protocol
#include <Adafruit_RGBLCDShield.h> // LCD + Button shield protocol
#include "DHT.h" // DHT11 Temp/Humidity Sensor
// --------------PARAMETERS---------------------
int heat = 45; // This is the default heater trigger temp setting
int cool = 73; // This is the default cooling trigger temp setting
// name: HVAC_Thermostat.ino
// author: Aaron Anderson
// -------------LIBRARIES---------------- THESE ARE REQUIRED TO BE IN YOUR SKETCHBOOK\LIBRARY FOLDER FOR COMPILING ----
#include <Wire.h> // Protocol to communicate with I2C devices
#include <Adafruit_MCP23017.h> // LCD protocol
#include <Adafruit_RGBLCDShield.h> // LCD + Button shield protocol
#include "DHT.h" // DHT11 Temp/Humidity Sensor
// --------------PARAMETERS---------------------
int heat = 45; // This is the default heater trigger temp setting
@LVLAaron
LVLAaron / gist:6a62d19a41b6d549ca53
Last active August 29, 2015 14:02
HVAC_Control
// name: HVAC.ino
// author: Aaron Anderson
// -------------LIBRARIES---------------- THESE ARE REQUIRED TO BE IN YOUR SKETCHBOOK\LIBRARY FOLDER FOR COMPILING ----
#include <Wire.h> // Protocol to communicate with I2C devices
#include <Adafruit_MCP23017.h> // LCD protocol
#include <Adafruit_RGBLCDShield.h> // LCD + Button shield protocol
#include "DHT.h" // DHT11 Temp/Humidity Sensor
// --------------PARAMETERS---------------------
@LVLAaron
LVLAaron / DeployVM.ps1
Created January 24, 2014 20:21
Deploy multiple vmware guests based on limited input data provided by web request form.
Clear-Host
# Add PowerCLI bits
Add-PSSnapin -Name "VMware.VimAutomation.Core" -ErrorAction SilentlyContinue
# Connect to Virtual Infrastructure
Connect-VIserver LouPrMgt011.zcloud.com
$vmlist = Import-CSV "C:\Users\aaron.anderson\Downloads\ServerBuild.csv"
# Syntax and sample for CSV File:
# ipaddress,vmname,template
@LVLAaron
LVLAaron / ExchShowSmallestDatabase
Created January 24, 2014 20:20
Find the smallest exchange database (this is where you want to create new mailboxes) Use in various other scripts.
# Script to return the smallest database on a specified server
# Written by Ben Lye - 20th August 2008
# By default the smallest database is determined by summing the size of all the mailboxes in each database.
# Optionally the -edb flag can be specified to make the script look at the EDB file size instead.
# If no server name is specified on the command line one will be prompted for
# Usage:
# Get-SmallestDatabase.ps1 [-Server <Server name>] [-edb]
@LVLAaron
LVLAaron / Fail to flush
Created December 24, 2013 23:27
Logstash error
Failed to flush outgoing items {:outgoing_count=>100, :exception=>#<Encoding::InvalidByteSequenceError: ""\xC0"" on ASCII-8BIT>, :backtrace=>["org/jruby/RubyString.java:7599:in `encode'", "json/ext/GeneratorMethods.java:71:in `to_json'", "file:/home/aaron/Downloads/logstash-1.3.2-flatjar.jar!/logstash/event.rb:168:in `to_json'", "jar:file:/home/aaron/Downloads/logstash-1.3.2-flatjar.jar!/logstash/outputs/elasticsearch.rb:322:in `flush'", "org/jruby/RubyArray.java:1613:in `each'", "jar:file:/home/aaron/Downloads/logstash-1.3.2-flatjar.jar!/logstash/outputs/elasticsearch.rb:310:in `flush'", "jar:file:/home/aaron/Downloads/logstash-1.3.2-flatjar.jar!/stud/buffer.rb:219:in `buffer_flush'", "org/jruby/RubyHash.java:1338:in `each'", "jar:file:/home/aaron/Downloads/logstash-1.3.2-flatjar.jar!/stud/buffer.rb:216:in `buffer_flush'", "jar:file:/home/aaron/Downloads/logstash-1.3.2-flatjar.jar!/stud/buffer.rb:193:in `buffer_flush'", "jar:file:/home/aaron/Downloads/logstash-1.3.2-flatjar.jar!/stud/buffer.rb:159:in `buffer
{
"_index": "logstash-2013.12.24",
"_type": "iis",
"_id": "SNe1bJpGRCarC6sM_7DoYg",
"_score": null,
"_source": {
"message": "{\"EventReceivedTime\":\"2013-12-24 14:57:38\",\"SourceModuleName\":\"iis_in\",\"SourceModuleType\":\"im_file\",\"date\":\"2012-01-08\",\"time\":\"23:48:39\",\"s-ip\":\"10.1.0.16\",\"cs-method\":\"GET\",\"cs-uri-stem\":\"/\",\"cs-uri-query\":null,\"s-port\":\"443\",\"cs-username\":null,\"c-ip\":\"10.1.206.122\",\"cs-User-Agent\":\"Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0)\",\"sc-status\":\"302\",\"sc-substatus\":\"0\",\"sc-win32-status\":\"0\",\"time-taken\":\"1390\",\"EventTime\":\"2012-01-08 23:48:39\"}\r\n{\"EventReceivedTime\":\"2013-12-24 14:57:38\",\"SourceModuleName\":\"iis_in\",\"SourceModuleType\":\"im_file\",\"date\":\"2012-01-08\",\"time\":\"23:48:39\",\"s-ip\":\"10.1.0.16\",\"cs-method\":\"GET\",\"cs-uri-stem\":\"/login.aspx\",\"cs-uri-query\":\"ReturnUrl=%2f&AspxAutoDetectCookieSupport=1\",\"s-port\":\"443\",\"cs-username\":null,\"
@LVLAaron
LVLAaron / Example output with no filters
Last active November 16, 2016 22:06
Config files used to send Windows Eventlog data with NXLOG to Logstash
{
"_index": "logstash-2013.12.23",
"_type": "logs",
"_id": "eMsyB2q4TA6sH0bW3kCBZA",
"_score": null,
"_source": {
"EventTime": "2013-12-22 22:45:27",
"Hostname": "aapc",
"Keywords": -9187343239835812000,
"EventType": "INFO",