Skip to content

Instantly share code, notes, and snippets.

View trackzero's full-sized avatar

TrackZero trackzero

View GitHub Profile
@trackzero
trackzero / motion-illuminance.yaml
Last active November 15, 2023 01:20 — forked from Danielbook/motion-illuminance.yaml
Motion and Illuminance level
blueprint:
name: Motion-activated Light with illuminance
description: Turn on a light when motion is detected and illuminance is below a set Lux level.
domain: automation
input:
motion_entity:
name: Motion Sensor
selector:
entity:
domain: binary_sensor
@trackzero
trackzero / ConsoleGenerator.ps1
Last active October 27, 2017 23:33
PowerShell script to generate a presigned URL for console login, using long-term credentials instead of a password.
#Requires -Modules AWSPowerShell
#todo: iterate profiles with get-awscredential -listprofiledetail and allow selection at runtime, set up multiple policies
#Use:
# ConsoleGenerator.ps1
# Description: Generate presigned URL for AWS console login.<BR>
# Supported parameters:
# -profile <profileID> #ID from your .aws/config file>
# -label <label> #role descriptor to show in the console.
#by https://github.com/trackzero
var AWS = require("aws-sdk");
AWS.config.update({
region: "us-east-1"
});
var docClient = new AWS.DynamoDB.DocumentClient();
var workspaces = new AWS.WorkSpaces();
var myWorkSpace;
@trackzero
trackzero / AWSSetupWindowsTools
Last active August 29, 2015 14:14
PowerShell to install Python, boto, and AWSCLI.
# PowerShell to install Python, Boto, and AWSCLI
# Check for latest Python version and update link in following line.
Invoke-WebRequest -Outfile $env:userprofile\python.msi https://www.python.org/ftp/python/2.7.9/python-2.7.9.amd64.msi
msiexec.exe /i $env:userprofile\python.msi /quiet
set PATH "%PATH%;C:\Python27;C:\Python27\Scripts"
setx PATH "%PATH%;C:\Python27;C:\Python27\Scripts"
Invoke-WebRequest -Outfile $env:userprofile\pip.py https://bootstrap.pypa.io/get-pip.py
sleep 30
C:\Python27\python.exe $env:userprofile\pip.py
C:\Python27\Scripts\pip.exe install boto
Using Amazon Linux, a clean install...
(from http://wiki.centos.org/HowTos/postfix)
(remember to sudo where appropriate, or "sudo su -" to run everything as root)
yum install postfix dovecot
yum remove sendmail
add/update the following in /etc/postfix/main.cf
myhostname = mail.YOURDOMAIN.COM