Skip to content

Instantly share code, notes, and snippets.

Avatar

Alex Kretzschmar IronicBadger

View GitHub Profile
View esphome.yaml
esphome:
name: sonoffsv_garage_car
platform: ESP8266
board: esp01_1m
wifi:
ssid: "123"
password: "123"
# Enable fallback hotspot (captive portal) in case wifi connection fails
@IronicBadger
IronicBadger / snippet-lovelace-ui.yaml
Created Mar 29, 2020
home assistant covid tracker
View snippet-lovelace-ui.yaml
cards:
- content: >-
# Quarantine-o-meter
The gauge meters display the amount of time spend at home in the last 7
days. Where Alex left the house (on average) {{
(states("sensor.quarantine_meter_alex_times_left")|int / 7) | round(1) }}
times per day and Cat {{
(states("sensor.quarantine_meter_cat_times_left")|int / 7) | round(1) }}
times per day.
View generate-manifest.sh
#!/bin/bash
rm -rf bootstrap-files/
sleep 1
mkdir -p bootstrap-files
cp install-config.yaml bootstrap-files/
cp append-bootstrap.ign bootstrap-files/
cd bootstrap-files
@IronicBadger
IronicBadger / docker-compose.yaml
Created Jan 8, 2020
LIbrespeed docker-compose snippet
View docker-compose.yaml
---
version: "2"
services:
librespeed:
image: adolfintel/speedtest
container_name: librespeed
ports:
- 8008:80
environment:
- MODE=standalone
@IronicBadger
IronicBadger / ocp-backup.sh
Last active May 22, 2019
OCP 3 etcd and master backups
View ocp-backup.sh
#!/bin/bash
export ETCD_ENDPOINTS="https://ocp311-m1.ktz.lan:2379,https://ocp311-m2.ktz.lan:2379,https://ocp311-m3.ktz.lan:2379"
# master backup
mkdir git && cd git
git clone https://github.com/openshift/openshift-ansible-contrib.git
touch /etc/pki/ca-trust/source/anchors/test # github issue opened to avoid this step
./openshift-ansible-contrib/reference-architecture/day2ops/scripts/backup_master_node.sh
@IronicBadger
IronicBadger / replace.sh
Created Feb 12, 2019
linuxserver readme changelog script
View replace.sh
#!/bin/bash
# call as replace.sh filename
file="$1"
sed -i 's/+ \*\*/ - { date: "/g' $file
sed -i 's/:\*\* /:", desc: "/g' $file
sed -i '/ - { date:/ s/$/" }/' $file
View configuration.yaml
light:
- platform: mqtt
schema: json
effect: true
effect_list:
- bpm
- confetti
- cyclon rainbow
- dots
- fire
View hassio configuration.yaml
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: 35.7796
longitude: -78.6382
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 0
# metric for Metric, imperial for Imperial
unit_system: imperial
View Dockerfile.rhel7
FROM registry.access.redhat.com/openshift3/jenkins-slave-base-rhel7
MAINTAINER Gabe Montero <gmontero@redhat.com> Alex Kretzschmar <alexktz@redhat.com>
# Labels consumed by Red Hat build service
LABEL com.redhat.component="jenkins-agent-maven-35-rhel7-container" \
name="openshift3/jenkins-agent-maven-35-rhel7" \
version="3.11" \
architecture="x86_64" \
io.k8s.display-name="Jenkins Agent Maven" \
@IronicBadger
IronicBadger / convert.sh
Last active Sep 3, 2018
automated audiobook DRM stripping
View convert.sh
#!/bin/bash
# ./convert -a asdfghjk
# Obtain an activation_bytes string and plug it into this script with -a.
FILES=aax/*
OUTPUT=mp3
while getopts a: option
do
case "${option}"
You can’t perform that action at this time.