Skip to content

Instantly share code, notes, and snippets.

@luxalpa
luxalpa / Dockerfile
Last active February 3, 2026 21:30
Leptos app prod build
# Get started with a build env with Rust nightly
FROM rust:1.90.0-bookworm AS builder
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends clang npm musl-tools musl-dev lld
RUN wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
RUN tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz
RUN cp cargo-binstall /usr/local/cargo/bin
RUN cargo binstall cargo-leptos -y
@luxalpa
luxalpa / userChrome.css
Created January 27, 2026 20:50
Firefox Tab Center Reborn config
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* to hide the native tabs */
#TabsToolbar {
visibility: collapse;
}
/* to hide the sidebar header */
#sidebar-header {
visibility: collapse;
@luxalpa
luxalpa / _source.md
Last active December 31, 2025 09:43
LLM-based decompile (Hexplore)

Properly decompile the following code into C++ (with good variable names, correct control flow, etc):

//
// Created by Luxalpa on 2023-03-02.
//

#include "sb0.h"
#include "../filedb.h"
#include "../globals.h"
Suspend starting
Resource resolving!
Suspend resolving!
thread 'actix-rt|system:0|arbiter:0' panicked at C:\Users\Luxalpa\.cargo\git\checkouts\leptos-79e4740403520456\c6de7c7\reactive_graph\src\owner\arena.r
s:57:25:
at C:\Users\Luxalpa\.cargo\git\checkouts\leptos-79e4740403520456\c6de7c7\reactive_graph\src\owner\arena.rs:60:29, the `sandboxed-arenas` feature is act
ive, but no Arena is active
stack backtrace:
0: std::panicking::begin_panic_handler
@luxalpa
luxalpa / game_runner.rs
Last active March 4, 2026 17:21
Winit event loop
use std::rc::Rc;
use anyhow::Result;
use winit::dpi::PhysicalSize;
use winit::event::{DeviceEvent, DeviceId, WindowEvent};
use winit::event_loop::{ActiveEventLoop, ControlFlow, EventLoop};
use winit::window::{Window, WindowId};
use winit::application::ApplicationHandler;
use crate::debug::InputSimulator;
@luxalpa
luxalpa / kinefx__rig_pose.py
Created January 5, 2021 22:42
Fix for Houdini's KineFX Rig Pose Handle throwing errors and displaying too many points
import hou
import collections
import math
import stateutils as su
import toolutils
from kinefx import kinefx_utils
from kinefx import kinefxstateutils
from kinefx.ui import kinefxbasestate