Skip to content

Instantly share code, notes, and snippets.

View ChristianHamm's full-sized avatar

Christian Hamm ChristianHamm

  • STACKIT
  • Augsburg, Germany
View GitHub Profile
@tcheneau
tcheneau / shell.nix
Created April 21, 2025 16:10
Building and running ebiten based golang programs on NixOS
{ pkgs ? import <nixpkgs> {} }:
# run nix-shell to initialize the environment
pkgs.mkShell {
# nativeBuildInputs is usually what you want -- tools you need to run
nativeBuildInputs = with pkgs.buildPackages; [ xorg.libX11 xorg.libXcursor xorg.libXrandr xorg.libXinerama xorg.libXi xorg.libXext libGL xorg.libXxf86vm ];
shellHook = "EBITENGINE_LIBGL=\"${pkgs.libGL}/lib/libGL.so\"; export EBITENGINE_LIBGL; EBITENGINE_LIBGLESv2=\"${pkgs.libGL}/lib/libGLESv2.so\"; export EBITENGINE_LIBGLESv2; export LD_LIBRARY_PATH=\"${pkgs.libGL}/lib:$LD_LIBRARY_PATH\";";
}
@leinich
leinich / gist:38b15ad7b60c699b85395533ed208f56
Last active April 3, 2025 03:31
e3dc Configuration Modbus for Homeassistant via YAML
modbus:
name: e3dc
type: tcp
host: 192.168.1.68
port: 502
sensor:
- platform: template
sensors:
e3dc_netzeinspeisung:
@peterhurford
peterhurford / install_xelatex_on_mac.txt
Last active February 17, 2026 19:03
How to install latex and xelatex on Mac so that Jupyter "Download as PDF" will work
brew install pandoc
brew tap homebrew/cask
brew install --cask basictex
eval "$(/usr/libexec/path_helper)"
# Update $PATH to include `/usr/local/texlive/2022basic/bin/universal-darwin`
sudo tlmgr update --self
sudo tlmgr install texliveonfly
sudo tlmgr install xelatex
sudo tlmgr install adjustbox
sudo tlmgr install tcolorbox
@kiela
kiela / zfs
Last active October 21, 2022 16:10
HOWTO: Hetzner + FreeBSD 13.1 + mirrored root on ZFS + optimized for 4K drives
# Wipe out disks from whatever they contain.
root@mfsbsd:~ # dd if=/dev/zero of=/dev/nvd0 bs=1M status=progress
dd: /dev/nvd0: short write on character devicesferred 1186.001s, 3237 MB/s
dd: /dev/nvd0: end of device
3662831+0 records in
3662830+1 records out
3840755982336 bytes transferred in 1186.555877 secs (3236894322 bytes/sec)
root@mfsbsd:~ # dd if=/dev/zero of=/dev/nvd1 bs=1M status=progress
dd: /dev/nvd1: short write on character devicesferred 1187.004s, 3233 MB/s