Skip to content

Instantly share code, notes, and snippets.

View Floppe's full-sized avatar

Joachim Wickman Floppe

View GitHub Profile
@Floppe
Floppe / notify-or-do-something-when-an-appliance-like-a-dishwasher-or-washing-machine-finishes.yaml Home Assistant Blueprint: Notify or do something when an appliance like a dishwasher or washing machine finishes
blueprint:
name: Appliance has finished
description: Do something when an appliance (like a washing machine or dishwasher)
has finished as detected by a power sensor.
domain: automation
input:
power_sensor:
name: Power Sensor
description: Power sensor entity (e.g. from a smart plug device).
selector:
@Floppe
Floppe / SSL.md
Created August 19, 2024 06:45 — forked from gangsta/SSL.md
How to Setting Up a Comodo SSL Cert

How to Setting Up a Comodo SSL Cert

  • I advice you to buy SSL Certs from officially Comodo only , or some SSL reseller whose you trust.

These are the steps I went through to set up an SSL cert. Purchase the cert

Prior to purchasing a cert, you need to generate a private key, and a CSR file (Certificate Signing Request). You’ll be asked for the content of the CSR file when ordering the certificate:

openssl req -new -newkey rsa:2048 -nodes -keyout example_com.key -out example_com.csr
@Floppe
Floppe / Ubuntu 24.04 LTS Noble install onto LVM partition.md
Last active April 29, 2024 10:13
Ubuntu 24.04 LTS Noble install onto LVM partition.md

Install base system

Boot the Ubuntu installation medium. When asked, choose the "Try Ubuntu" option and open a terminal.

Switch to root, otherwise you'll have to type sudo all the time:

sudo su -
@Floppe
Floppe / decompress_kernel
Created April 29, 2024 08:15
Decompress kernels post hook
#!/bin/bash
KERNEL_VERSION="$1"
KERNEL_PATH="$2"
# extract-vmlinux is in /usr/local/bin
PATH="${PATH}:/usr/local/sbin"
# Ensure we have the extract-linux tool
if ! command -v extract-vmlinux > /dev/null; then

These instructions are based on this blogpost by Anton Semjonov and this video by Animortis Productions. Please follow the link if you want more details, they go into much more detail about each step, whereas this document is more focused on being a concise cheat sheet. Let's go.

Install base system

Boot the Ubuntu installation medium. When asked, choose the "Try Ubuntu" option and open a terminal.

Switch to root, otherwise you'll have to type sudo all the time:

sudo su -
@Floppe
Floppe / gist:a57d8bffa5cdb9fc8812794abeefdb19
Created November 8, 2022 10:28 — forked from flox1an/gist:2a726224e23381fa41f9
Change username for cm:owner cm:creator cm:modifier in Alfresco Javascript Console
var ctx = Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext();
var behaviourFilter = ctx.getBean("policyBehaviourFilter");
// -----------------------------------------------------------------
function findAndReplaceAttribute(query, attribute, value) {
nodes = search.luceneSearch(query);
for each(var node in nodes) {
@Floppe
Floppe / sofar_ktlxg3.yaml
Last active April 6, 2025 13:04
Sofar Solar KTL-X G3 inverter to be used with HomeAssistant Solarman integration
# Sofar 3.3-12KTLX-G3
# Note: no modbus energy meter connected
requests:
- start: 0x0404
end: 0x042E
mb_functioncode: 0x03
- start: 0x0484
end: 0x04BC
mb_functioncode: 0x03

Keybase proof

I hereby claim:

  • I am floppe on github.
  • I am jokke (https://keybase.io/jokke) on keybase.
  • I have a public key whose fingerprint is 778E C2FB 76E8 A091 8098 6CF7 5436 AC14 B73A 8D1D

To claim this, I am signing this object: