Skip to content

Instantly share code, notes, and snippets.

View langerma's full-sized avatar
🔥
Working from home

DataPoints langerma

🔥
Working from home
View GitHub Profile
@langerma
langerma / epaper.yaml
Created August 10, 2023 18:19
esphome epaper display
globals:
- id: forecast_nums
type: std::vector<int>
- id: notification_nums
type: std::vector<int>
- id: data_updated
type: bool
restore_value: no
initial_value: 'false'
- id: initial_data_received
@langerma
langerma / kafkaui.nomad.hcl
Created April 4, 2023 10:41
deploy kafka-ui on nomad
job "kafkaui" {
datacenters = ["yourdc"]
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
group "kafkaui" {
constraint {
attribute = "${attr.cpu.arch}"
value = "arm64"
@langerma
langerma / kafka.nomad.hcl
Created April 4, 2023 09:57
deploy kafka kraft cluster with nomad
job "kafka" {
datacenters = ["yourdatacenter"]
type = "service"
update {
stagger = "5s"
max_parallel = 3
}
group "kafka" {
# There can only be a single job definition per file.
# Create a job with ID and Name 'example'
job "postgres" {
datacenters = ["hetzner"]
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
update {
job "zookeeper" {
datacenters = ["hetzner"]
type = "service"
#update {
# max_parallel = 1
#}
job "druid" {
datacenters = ["hetzner"]
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
update {
stagger = "10s"
max_parallel = 1
@langerma
langerma / haproxy-ingress.hcl
Created July 26, 2022 07:57 — forked from hynek/haproxy-ingress.hcl
nomad job for HAProxy ingress
job "ingress" {
region = "global"
datacenters = ["home"]
type = "service"
constraint {
attribute = "${meta.proxy_type}"
value = "internal"
}
@langerma
langerma / loki.nomad.hcl
Created April 26, 2022 13:21
loki distributed
job "loki" {
datacenters = ["hetzner"]
type = "service"
group "loki-distributor" {
count = 2
network {
dns {
servers = ["169.254.1.1"]
@langerma
langerma / letsencrypt2consul.nomad.hcl
Created March 23, 2022 10:17
job file to create and deploy certs from letsencrypt
job "update-certs" {
datacenters = ["hetzner"]
type = "batch"
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
@langerma
langerma / dhcp2mqtt.sh
Last active December 28, 2021 14:23
homeassistant device tracking via dnsmasq dhcp
#!/bin/sh
op="${1:-op}"
mac="${2:-mac}"
ip="${3:-ip}"
hostname="${4}"
discovery="dhcp-$(echo ${mac} | sed -e s/://g)-tracker"
macvendor="$(echo ${mac} | tr -d ':' | head -c 6 | tr '[:lower:]' '[:upper:]')"
#vendor="$(grep '${macvendor}' /usr/local/bin/oui.txt | cut -d')' -f2 | tr -d '\t')"
#vendor="$(grep '${macvendor}' /usr/local/bin/oui.txt)"