Skip to content

Instantly share code, notes, and snippets.

View jaedle's full-sized avatar

Dennis Wielepsky jaedle

  • Germany
  • 04:30 (UTC +01:00)
View GitHub Profile
@geekman
geekman / telegraf_mqtt.conf
Created January 3, 2022 16:41
Telegraf configuration to ingest Zigbee2MQTT messages
#
# configuration for zigbee2mqtt ingestation
# monitors all exposed devices, while ignoring the z2m bridge
#
[[inputs.mqtt_consumer]]
servers = ["tcp://localhost:1883"]
topics = ["zigbee2mqtt/#"]
data_format = "json"
@madduci
madduci / ftth_openwrt.md
Last active October 21, 2025 20:49
Deutsche Telekom FTTH Access with OpenWRT

Configuring Deutsche Telekom FTTH Access with OpenWRT

After looking for alternatves to the suggested Router from Telekom (AVM FritzBox and HUawei Speedport), I've discovered the possibility of configuring my existing OpenWRT Router to act as gateway to the Telekom FTTH (Fiber To The Home) Magenta Zuhause package.

TL;DR

The WAN interface must be configured as follows (see your Telekom letter):

  • Protocol: PPPoE
  • PAP/CHAP username:
@leodido
leodido / syslog to influx.md
Last active November 18, 2024 19:35
Send docker syslogs to telegraf

Syslog to InfluxDB

docker => syslog (RFC5424, non-transparent) => telegraf => (*)

Docker can use syslog as a log driver.

Anyway it transport syslog message towards destination using the non-transparent framing technique (also if deprecated by the octet-counting).

Using the telegraf syslog input plugin link.

@crypticmind
crypticmind / README.md
Last active August 23, 2025 10:36
Setup lambda + API Gateway using localstack
@rbaarda
rbaarda / hs110-data-collect.py
Created November 19, 2017 22:43
Python3 script which collects data from a HS110 power plug and tries to send it to a local Graphite instance.
import sys
import time
import socket
import json
import threading
# https://stackoverflow.com/questions/21017698/converting-int-to-bytes-in-python-3
def int_to_bytes(x):
return x.to_bytes((x.bit_length() + 7) // 8, 'big')
@georgkreimer
georgkreimer / gist:7a02af49604da91c5e3605b08b2872ec
Created May 15, 2017 20:28
UFW config w/ NBD connections
https://community.online.net/t/enable-ufw-in-debian-or-ubuntu-results-in-lock-out/2118/2
Set the default INPUT policy to ACCEPT: Edit /etc/default/ufw and set:
DEFAULT_INPUT_POLICY="ACCEPT"
Append a drop-all rule to the INPUT chain: Edit /etc/ufw/after.rules, add this line just before the final COMMIT line:
-A ufw-reject-input -j DROP
Disable UFW logging (this seems to cause issuses with Scaleway's default kernel):
ufw logging off
@shareefhiasat
shareefhiasat / import-rds-certs.sh
Last active August 27, 2024 15:21 — forked from steini/import-rds-certs.sh
import RDS certificates to java keystore on alpine / osx
#!/usr/bin/env sh
#i tried it and working like charm just have to note make the file .sh chmod +x and you may need sudo to run with permission but be carefull with sudo
#be sure the $JAVA_HOME is configure correctly or make it static as commentedline 7 below
OLDDIR="$PWD"
if [ -z "$CACERTS_FILE" ]; then
# you should have java home configure to point for example /usr/lib/jvm/default-java/jre/lib/security/cacerts
CACERTS_FILE=$JAVA_HOME/jre/lib/security/cacerts
fi
@arsham
arsham / go_cpu_memory_profiling_benchmarks.sh
Last active August 15, 2025 10:10
Go cpu and memory profiling benchmarks. #golang #benchmark
go test -run=. -bench=. -benchtime=5s -count 5 -benchmem -cpuprofile=cpu.out -memprofile=mem.out -trace=trace.out ./package | tee bench.txt
go tool pprof -http :8080 cpu.out
go tool pprof -http :8081 mem.out
go tool trace trace.out
go tool pprof $FILENAME.test cpu.out
# (pprof) list <func name>
# go get -u golang.org/x/perf/cmd/benchstat
benchstat bench.txt
@matthiasbalke
matthiasbalke / helper.gradle
Last active October 20, 2024 11:40
Gradle resolveDependencies Task
// found here: http://jdpgrailsdev.github.io/blog/2014/10/28/gradle_resolve_all_dependencies.html
task resolveDependencies {
doLast {
project.rootProject.allprojects.each { subProject ->
subProject.buildscript.configurations.each { configuration ->
resolveConfiguration(configuration)
}
@KenVanHoeylandt
KenVanHoeylandt / build.gradle
Last active November 7, 2024 20:06
Gradle auto-installing pre-commit hook
apply from: rootProject.file('gradle/install-git-hooks.gradle')