Skip to content

Instantly share code, notes, and snippets.

remote_transmitter:
pin: GPIO13
carrier_duty_percent: 50%
# Power Controls
switch:
- platform: template
name: "SAMSUNG_KEY_POWER_TOGGLE"
diff --git a/src/core/jupyter/jupyter-fixups.ts b/src/core/jupyter/jupyter-fixups.ts
index de0bbe3..cfe0673 100644
--- a/src/core/jupyter/jupyter-fixups.ts
+++ b/src/core/jupyter/jupyter-fixups.ts
@@ -181,7 +181,7 @@ export function fixupFrontMatter(nb: JupyterNotebook): JupyterNotebook {
nbLines(jupyterCellSrcAsLines(cell)).join(""),
);
if (headingText && !contentBeforeHeading) {
- title = headingText;
+ // title = headingText;
@lukts30
lukts30 / bigE.patch
Created February 21, 2025 21:24
Rdm4 big endian
diff --git a/rdm4lib/src/lib.rs b/rdm4lib/src/lib.rs
index 07a933a..4dd2b26 100644
--- a/rdm4lib/src/lib.rs
+++ b/rdm4lib/src/lib.rs
@@ -107,7 +107,7 @@ impl RdModell {
fn new(buf: Vec<u8>) -> Self {
let mut reader = std::io::Cursor::new(&buf);
- let rdm: RdmFile<RdmKindMesh> = reader.read_le().unwrap();
+ let rdm: RdmFile<RdmKindMesh> = reader.read_be().unwrap();
@lukts30
lukts30 / shell.nix
Last active February 12, 2025 15:57
libguestfs NixOS 24.11 appliance
{
pkgs ? import <nixpkgs> { },
}:
let
stub-pacman = pkgs.writeTextFile {
name = "stub-pacman";
text = ''
#!/bin/sh
exit 0
'';
<domain type="kvm">
<name>win11-2</name>
<uuid>de5a3f63-d63e-496f-84d9-ce849b304231</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://microsoft.com/win/11"/>
</libosinfo:libosinfo>
</metadata>
<memory unit="KiB">8388608</memory>
<currentMemory unit="KiB">8388608</currentMemory>
@lukts30
lukts30 / gist:a2333f4b405cb19a6e5f24285e8c5304
Created August 10, 2024 19:31
slow 20min but works: make-disk-image.nix under qemu-user
nixos-disk-image> error while reading directory /build/root: Cannot allocate memory
nixos-disk-image> [ 118.933097] reboot: Restarting system
nixos-disk-image> WARNING: Image format was not specified for 'nixos.raw' and probing guessed raw.
nixos-disk-image> Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
nixos-disk-image> Specify the 'raw' format explicitly to remove the restrictions.
nixos-disk-image> kvm version too old
nixos-disk-image> qemu-system-aarch64: failed to initialize kvm: Inappropriate ioctl for device
nixos-disk-image> qemu-system-aarch64: falling back to tcg
nixos-disk-image> loading kernel modules...
nixos-disk-image> cat: can't open '/nix/store/4dsqx50k3x8yxa5akmxfi733fv07ak8r-linux-6.6.44-shrunk/insmod-list': No such file or directory
#include <Uefi.h>
#include <Library/UefiLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#!/usr/bin/expect -f
#stty rows 25 columns 80
# Set the timeout for each expect statement
set timeout -1
# Log the output to a file for debugging
log_file -a uefi_automation.log
@lukts30
lukts30 / configuration.nix
Created April 22, 2024 21:29
ftdi_sio nix
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix