Skip to content

Instantly share code, notes, and snippets.

View tkuennen's full-sized avatar

Travis Kuennen tkuennen

View GitHub Profile
# Long version
# Input variable to mount remote UNC Path as a local drive
$mountAsUser='domain\serviceAccount'
$mountAsPassword='somecomplexpassword'
$uncPath='\\server009\share01\public'
# Scan for next available drive letter, excluding D "CD Rom" and H "Home"
$unavailableDriveLetters=(Get-Volume).DriveLetter|sort
$availableDriveLetters=.{(65..90|%{[char]$_})|?{$_ -notin $unavailableDriveLetters}}
[char]$firstAvailableDriveLetter=$availableDriveLetters[0]
# Victron modbus connection
modbus:
- name: camper-victron
type: tcp
host: 1.2.3.4
port: 502
sensors:
- name: System DC Load
unit_of_measurement: 'W'
device_class: power
@tkuennen
tkuennen / zen34.yaml
Created September 16, 2022 04:45
Zooz remote switch automation triggers
blueprint:
name: Zooz ZEN34 Remote scene control
description: |
Use the Zooz ZEN34 remote to trigger Scenes and control devices based on varying scenes.
This Blueprint is currently configured for the zwaveJS platform.
domain: automation
input:
- hosts: all
become: true
become_user: root
gather_facts: False
tasks:
- name: 1. Adding Intel® oneAPI repository key
shell:
cmd: wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
- name: 2. Adding Intel® oneAPI repository
cat /dev/urandom | tr -dc '0-9A-F' | fold -w 32 | head -n 1 | sed -e 's/\(..\)/0x\1, /g' -e 's/, $//'
# Source: https://gist.github.com/48f44d3974db698d3127f52b6e7cd0d3
###########################################################
# Automation of Everything #
# How To Combine Argo Events, Workflows, CD, and Rollouts #
# https://youtu.be/XNXJtxkUKeY #
###########################################################
# Requirements:
# - k8s v1.19+ cluster with nginx Ingress
aws lambda invoke --function-name my-function out --log-type Tail
wget --recursive --no-parent -e robots=off https://archive.kernel.org/debian-archive/debian/
'Strict-Transport-Security', value: 'max-age=63072000; includeSubdomains; preload'}];
'Content-Security-Policy', value: "default-src 'none'; img-src 'self'; script-src 'self'; style-src 'self'; object-src 'none'"}];
'X-Content-Type-Options', value: 'nosniff'}];
'X-Frame-Options', value: 'DENY'}];
'X-XSS-Protection', value: '1; mode=block'}];
'Referrer-Policy', value: 'same-origin'}];
@tkuennen
tkuennen / rhel-ansible-play-install-oneapi.yml
Last active July 26, 2023 19:03
Installs Intel OneAPI (Written for RHEL/CentOS/ALMA/Rocky)
- hosts: localhost
become: true
become_user: root
gather_facts: False
tasks:
- name: 1. Adding Intel® oneAPI repository
yum_repository:
name: OneAPI
description: Intel® oneAPI repository
baseurl: https://yum.repos.intel.com/oneapi