Skip to content

Instantly share code, notes, and snippets.

View mdeweerd's full-sized avatar

MDW mdeweerd

  • France
View GitHub Profile
@mdeweerd
mdeweerd / proxmox-realtek-r8168.md
Last active March 3, 2025 00:06 — forked from tushroy/proxmox-realtek-r8168.md
Realtek r8168 Driver for Proxmox VE Kernel version 6.8

Realtek r8168 Driver for Proxmox VE Kernel version 6.8

Blacklist r8169 kernel driver for being loaded

echo blacklist r8169 >> /etc/modprobe.d/blacklist-r8169.conf

Once all of this is completed we are going to update our GRUB to have some specific kernel parameters for our realtek driver

@mdeweerd
mdeweerd / bathroom-humidity-exhaust-fan.yaml
Last active December 27, 2024 22:31 — forked from Blackshome/bathroom-humidity-exhaust-fan.yaml
bathroom-humidity-exhaust-fan.yaml
blueprint:
name: Bathroom Humidity Exhaust Fan
description: |
# 🚿 Bathroom Humidity Exhaust Fan
**Version: 2.6**
Step into the future of freshness - customize it your way and experience the convenience of automated humidity control! 🌿🚿
@mdeweerd
mdeweerd / build.bat
Last active March 3, 2025 15:20 — forked from GaryLee/build.bat
Build STM32CubeIDE project from command line.
@ECHO OFF
setlocal enabledelayedexpansion
set "STM32CUBEIDE="
for /d /r "C:\ST" %%d in ("STM32CubeIDE_*") do (
if not defined STM32CUBEIDE (
set "STM32CUBEIDE=%%~fd"
) else (
for /f "tokens=2 delims=_." %%a in ("%%~nd") do (
for /f "tokens=2 delims=_." %%b in ("!STM32CUBEIDE:_= !") do (
@mdeweerd
mdeweerd / fix-links.lua
Last active September 24, 2023 20:49 — forked from MyriaCore/fix-links.lua
How to use pandoc with gitlab markdown
@mdeweerd
mdeweerd / renew_ssl_cert.yaml
Last active January 17, 2025 19:00 — forked from e28eta/renew_ssl_cert.yaml
Homeassistant Blueprint for SSL-Certificate renewal
---
blueprint:
name: Renew Let's Encrypt Certificate
description: Renew Certificate when due date is below given value
domain: automation
input:
cert_expiry_sensor:
name: Certificate Expiry Sensor
description: "Sensor from the Certificate Expiry Integration (https://www.home-assistant.io/integrations/cert_expiry)"
selector:
@mdeweerd
mdeweerd / rc.local
Created May 25, 2022 17:57 — forked from dunkelstern/rc.local
iptables rules for vpn config
# for ISAKMP (handling of security associations)
iptables -A INPUT -p udp --dport 500 --j ACCEPT
# for NAT-T (handling of IPsec between natted devices)
iptables -A INPUT -p udp --dport 4500 --j ACCEPT
# for ESP payload (the encrypted data packets)
iptables -A INPUT -p esp -j ACCEPT
# for the routing of packets on the server
iptables -t nat -A POSTROUTING -j SNAT --to-source %IP% -o eth0
# internet access
iptables -t nat -A POSTROUTING -s 10.0.42.0/24 -o eth0 -m policy --dir out --pol ipsec -j ACCEPT
@mdeweerd
mdeweerd / motion_controlled_scenes_with_sun_elevation_check.yaml
Created November 6, 2021 16:39 — forked from Martinnygaard/motion_controlled_scenes_with_sun_elevation_check.yaml
Homeassistant blueprint for motion-activated light scene with sun elevation sensor
blueprint:
name: Motion-activated light scene with optional ambient scene with sun elevation sensor
description: Turn on a light scene when motion is detected and the sun is below given threshold. Four different scenes can be defined depending on time of day.
domain: automation
source_url: https://gist.github.com/Martinnygaard/7645dcee2ca03d18c7a9523aa592605b
input:
motion_entity:
name: Motion Sensor
description: Choose which motion sensor to use. If multiple motion sensors should trigger this automation, then group them in a template sensor or regular group.
selector:
@mdeweerd
mdeweerd / YouTube Video Data Tool.html
Last active October 31, 2021 13:25 — forked from jgrant41475/YouTube Video Data Tool.html
Fetches YouTube Video Information and creates a json-ld Video Object
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Foundation | Welcome</title>
<!-- <link rel="stylesheet" href="css/foundation.css" /> -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.7.3/css/foundation.min.css" integrity="sha512-2meDMHyoDRV8O0gr5Diq32ch+6QqI9Af9Km4eFwgxZg356CbUI4S30C3zuUetkNAN4Bn+17y9OgxoQ3HnQ648w==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body>
@mdeweerd
mdeweerd / convert_shape.py
Last active December 3, 2023 15:21 — forked from slazav/convert_shape.py
Convert OpenSCAD files to STEP or IGES using FreeCAD python library
#!/usr/bin/env /cygdrive/c/Program Files/FreeCAD 0.21/bin/python
#!/usr/bin/env /cygdrive/c/Program Files/FreeCAD 0.20/bin/python
#!/usr/bin/env python3
#!/usr/bin/env /cygdrive/c/Program Files/FreeCAD 0.20/bin/FreeCAD
#!/usr/bin/env /cygdrive/c/Program Files/FreeCAD 0.20/bin/FreeCADCmd
#!/usr/bin/freecad
#!/usr/bin/python
# (Options above for reminder, easy exchange of lines to adapt to local platform).
# /!\ Launch this script using the python provided/used by FreeCAD
# (Select/add the appropriate line above)
@mdeweerd
mdeweerd / KICAD_GENERATE_GERBER.BAT
Last active October 23, 2021 12:54 — forked from Salamandar/kicad_generate_gerber.py
Python script that generates Gerber, Drill map, Position file, and zips everything.
@echo OFF
REM
REM WRAPPER FOR WINDOWS INCLUDING THE PYTHON PATH FROM KICAD ITSELF
REM
REM GIT: [email protected]:df5b6a1462d3052a42dbaa0e35a5b952.git
REM URL: https://gist.github.com/df5b6a1462d3052a42dbaa0e35a5b952
REM
PATH="c:\Program Files\KiCad\bin";%PATH%
echo %~dp0