Skip to content

Instantly share code, notes, and snippets.

View fadenb's full-sized avatar

Tristan Helmich fadenb

  • Munich, Germany
View GitHub Profile
@fadenb
fadenb / nixos_zfs_install.sh
Last active December 26, 2025 11:12
I was curios whether ChatGPT can write a somewhat useful NixOS installer script. This is what it generated after being prompted with some notes about my usual setup.
#!/usr/bin/env bash
#
# nixos_zfs_sway_install.sh
#
# Fully automated (destructive) NixOS install to an encrypted ZFS root + EFI,
# configured for Wayland + Sway + PipeWire screen sharing.
#
# Included fixes:
# - Enable flakes/nix-command for this run via NIX_CONFIG (no writes required).
# - Best-effort write to /etc/nix/nix.conf if possible (ignored if read-only).
@fadenb
fadenb / flake.nix
Created December 26, 2025 10:03
Quick & dirty NixOS 25.11 ISO build for recent Laptop with Intel Core Ultra 7: `nix build .#nixosConfigurations.zfsIso.config.system.build.isoImage --extra-experimental-f eatures "nix-command flakes"`
{
description = "NixOS ISO - Core Ultra 7 Laptop - Linux 6.18 + ZFS 2.4";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
};
outputs = { self, nixpkgs, nixos-hardware }: {
nixosConfigurations.zfsIso = nixpkgs.lib.nixosSystem {
@fadenb
fadenb / simple_backstop.openscad
Last active December 7, 2025 16:15
I needed a really simple backstop for the iPad mounting angles I installed on the underside of a desk to ensure it is not pushed in to deep
// Parametric Backstop with Counterbore & Chamfers
// All units in mm
$fn = 25;
// Part Dimensions
stop_thickness = 12; // Y-axis dimension
stop_width = 20; // X-axis dimension
stop_height = 15; // Z-axis dimension (Screw axis)
chamfer_size = 1.0;
@fadenb
fadenb / L40H7A_recovery.md
Created June 21, 2025 09:56
Notes on recovery attempt of Chiq (Changhong) L40H7A TV stuck after boot on blue loading circle animation

Notes on recovery attempt of Chiq (Changhong) L40H7A TV stuck after boot on blue loading circle animation

Problem description

  • Device is powered on
  • Device shows white "Android" text and shortly after colorful full-screen animation
  • Background turns black and a 3/4 (three qarter) blue circle that is rotating is displayed
  • This continues for over 10 hours, powercycles etc do not change this and we always end up with this animation

Recovery Attempt (flashing system from USB drive)

@fadenb
fadenb / hex_1_4_inch_male_to_11_32_inch_female_adapter.scad
Created March 26, 2025 14:13
1/4" hex shank to 11/32" hex socket adapter SCAD file
/*
* Hex Bit Adapter: Converts a 1/4 inch (6.35 mm) male hex shank to an 11/32 inch (8.73 mm) female hex socket.
*/
epsilon = 0.01; // Small value (0.01 mm) to ensure proper overlap or gap for boolean operations.
// --- Parameters ---
male_hex_size_nominal = 6.35; // Nominal size of the male hex shank: 1/4 inch (6.35 mm)
male_hex_fit_tolerance = -0.1; // Tolerance for the male hex shank, negative for undersize (-0.1 mm) to ensure easier fit.
male_hex_af = male_hex_size_nominal + male_hex_fit_tolerance; // Across Flats dimension of the male hex shank.
@fadenb
fadenb / getmailrc
Created February 8, 2024 12:14
Example getmail6 config file to fetch a copy of all emails from Gmail. Should be placed at `~/.config/getmail/getmailrc`.
[retriever]
type = SimpleIMAPSSLRetriever
server = imap.gmail.com
port = 993
username = <YOUR-USERNAME@gmail.com>
password = <YOUR-APP-PASSWORD-WHILE-THEY-STILL-ALLOW-IT>
mailboxes = ALL
[destination]
type = Mboxrd
@fadenb
fadenb / extensions.md
Last active January 15, 2024 16:57
Automatic1111 Extensions I Like

Automatic1111 Extensions I like

  • sd-webui-controlnet
    • https://github.com/Mikubill/sd-webui-controlnet.git
  • After Detailer / adetailer
    • https://github.com/Bing-su/adetailer.git
  • Segment Anything
    • https://github.com/continue-revolution/sd-webui-segment-anything.git
  • Dynamic Prompts
@fadenb
fadenb / 2023-12-21_Apple_Public_Verification_Code.txt
Created December 21, 2023 12:36
My Apple Contact Key Verification Public Verification Code
APKTIDoLV060B_LpPwpXFQqH8HTJF7CcJHMGGIpfDWOPT1dYGU_g
@fadenb
fadenb / setup-docker.sh
Last active November 26, 2023 18:12
Set up Docker for use with NVIDIA GPU on Ubuntu 22.04
#!/bin/bash
# This script automates the installation and setup of Docker, Docker Compose, and NVIDIA Docker extensions on Ubuntu 22.04.
# It is designed to run without user interaction. Run this script with root privileges.
# Script URL: https://gist.github.com/fadenb/5eb42f646706891abe2c6f12799f6e89/raw/setup-docker.sh
# Ensure the script is run as root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root. Use 'sudo' to run it."
exit 1
@fadenb
fadenb / styles.csv
Created July 27, 2023 19:25
clipdrop.cp like styles for automatic1111 `styles.csv`
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 7.
name,prompt,negative_prompt
"Style: Enhance","breathtaking {prompt} . award-winning, professional, highly detailed","ugly, deformed, noisy, blurry, distorted, grainy"
"Style: Anime","anime artwork {prompt} . anime style, key visual, vibrant, studio anime, highly detailed","photo, deformed, black and white, realism, disfigured, low contrast"
"Style: Photographic","cinematic photo {prompt} . 35mm photograph, film, bokeh, professional, 4k, highly detailed","drawing, painting, crayon, sketch, graphite, impressionist, noisy, blurry, soft, deformed, ugly"
"Style: Digital art","concept art {prompt} . digital artwork, illustrative, painterly, matte painting, highly detailed","photo, photorealistic, realism, ugly"
"Style: Comic book","comic {prompt} . graphic illustration, comic art, graphic novel art, vibrant, highly detailed","photograph, deformed, glitch, noisy, realistic, stock photo"
"Style: Fantasy art","ethereal fantasy concept art of {prompt} . magnificent, celestial, ethereal, painterly, epic, majestic, magic