Skip to content

Instantly share code, notes, and snippets.

@mKeRix
mKeRix / JacksonXMLPoly.kts
Created March 4, 2021 19:22
Jackson XML Polymorph List
import com.fasterxml.jackson.databind.DeserializationFeature
import com.fasterxml.jackson.databind.MapperFeature
import com.fasterxml.jackson.databind.SerializationFeature
import com.fasterxml.jackson.dataformat.xml.JacksonXmlModule
import com.fasterxml.jackson.dataformat.xml.XmlMapper
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
import com.fasterxml.jackson.module.kotlin.KotlinModule
@mKeRix
mKeRix / getNodeLTS.sh
Last active March 8, 2024 22:50 — forked from SamKirsch10/getLatestNodeJS.sh
Downloads the latest LTS version and installs it into /opt/nodejs. Supports armv6l for e.g. the Pi Zero W.
#!/bin/bash
# Took the good bits from sdesalas/node-pi-zero/
# Switches to unofficial repo since armv6 was removed from main downloads
#
PI_ARM_VERSION=$(
uname -a |
egrep 'armv[0-9]+l' -o
);
@mKeRix
mKeRix / d6t_44l_06.h
Last active March 12, 2023 09:34
ESPHome D6T Custom Component
#include "esphome.h"
#include "math.h"
using namespace esphome;
#define I2C_ADDR_D6T 0x0a
#define CMD 0x4c
static const int SOBEL_X[3][3] =
{ { -1, 0, 1 },