Skip to content

Instantly share code, notes, and snippets.

@disconn3ct
disconn3ct / copy-favorites.sh
Created November 6, 2024 19:06
Mealie favorites sync
# Copy favorites from $ACCOUNT1 to $ACCOUNT2. No effort is made to prevent duplicates. It doesn't sync, it just copies.
set TOK='admin token here'
set ACCOUNT1='fff-fff-fff-fff-etc'
set ACCOUNT2='aaa-aaa-aaa-aaa-aaa'
set MEALIE='https://mealie.local'
# prints 'null' or error for each
curl -sSX 'GET' "$MEALIE/api/users/$ACCOUNT1/favorites" -H 'accept: application/json' -H"Authorization: Bearer $TOK" | \
jq -r '.ratings[].recipeId' | while read a ; do
curl -sSX 'POST' "$MEALIE/api/users/$ACCOUNT2/favorites/$a" -H'accept: application/json' -H"Authorization: Bearer $TOK" | jq .
@disconn3ct
disconn3ct / automations.yaml
Created April 7, 2023 14:07
Home Assistant automation for temperature (F) lights with time-decay brightness
- alias: LED - Temperature
description: ''
trigger:
# How often to decay:
- platform: time_pattern
seconds: /30
# And whenever the source is freshened:
- platform: state
entity_id:
- sensor.tomorrow_io_weather_feels_like
@disconn3ct
disconn3ct / jellyfin-intro-scanner.yaml
Last active June 28, 2022 15:35
Jellyfin Intro Scanner/Skipper
---
# https://mueslimak3r.github.io/tv-intro-detection/
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: "jellyfin-intro-scanner"
spec:
releaseName: "jellyfin-intro-scanner"
chart:
spec:
@disconn3ct
disconn3ct / Dockerfile
Created February 20, 2022 14:35
betaflight docker build
FROM ubuntu:20.04
VOLUME /opt/betaflight
WORKDIR /opt/betaflight
RUN apt update; apt install -y make build-essential python git curl
COPY entrypoint.sh /sbin/entrypoint.sh
ENTRYPOINT [ "/sbin/entrypoint.sh" ]
CMD [ "make" ]
@disconn3ct
disconn3ct / build.sh
Created January 23, 2012 20:32
modified build for spanner
#!/bin/bash
#
# Script to build CM9 for Galaxy Tab (with Kernel)
# 2012 Chirayu Desai
# Common defines
txtrst='\e[0m' # Color off
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
avg-cpu: %user %nice %system %iowait %steal %idle
7.00 0.20 1.20 91.60 0.00 0.00
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
mmcblk0 0.00 0.00 0.00 0 0
mmcblk0p2 0.00 0.00 0.00 0 0
mmcblk0p7 0.00 0.00 0.00 0 0
mmcblk0p8 0.00 0.00 0.00 0 0
mmcblk1 6.80 0.10 50.10 0 250
mmcblk1p2 0.00 0.00 0.00 0 0
$ echo $CROSS_COMPILER
/opt/CodeSourcery/bin/arm-none-eabi-
$ make ARCH=arm CROSS_COMPILE=$CROSS_COMPILER uImage -j4
CHK include/linux/version.h
SYMLINK include/asm -> include/asm-arm
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/linux/compile.h
@disconn3ct
disconn3ct / nookcolor.diff
Created January 21, 2012 11:17
Patch to fix mmc errors on nook color
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 674b54c..f0f6e41 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1154,6 +1154,20 @@ static void set_data_timeout(struct omap_hsmmc_host *host,
unsigned int timeout_ns,
unsigned int timeout_clks)
{
+ uint32_t reg;
+