Skip to content

Instantly share code, notes, and snippets.

@AxelRHD
AxelRHD / README.md
Last active September 30, 2026 06:21
zp: fish function to pick ~/<language>-projects/<project> with fzf and open it in a Zellij session

zp — open a project in Zellij, picked with fzf

A fish function for a home directory organized by language:

~/go-projects/webdev-playground
~/python-projects/flask-htpy-pg
~/bun-projects/…
@AxelRHD
AxelRHD / README.md
Created September 27, 2026 15:00
Toast notifications in plain JS + Open Props CSS, triggered from a Go backend via Datastar ExecuteScript

Toasts for server-driven pages

Small toast notifications in plain JavaScript and CSS, no build step. Made for server-rendered apps where the backend decides when to show a message — here with Datastar and Go, but the JS function works with anything that can run a line of JavaScript.

  • four levels: info, success, warning, error
  • toasts arriving together are staggered, so they don't appear and vanish as a block
@AxelRHD
AxelRHD / listener.janet
Last active April 9, 2026 21:15
Vial Web Framework (Janet)
[:script (raw "on(document, 'mymsg', ev => alert(ev.detail.message))")]
@AxelRHD
AxelRHD / config.kdl
Created January 5, 2026 14:51
zellij config
// ~/.config/zellij/config.kdl
//
// THIS FILE WAS AUTOGENERATED BY ZELLIJ, THE PREVIOUS FILE AT THIS LOCATION WAS COPIED TO: /home/axelr/.config/zellij/config.kdl.bak.1
//
keybinds clear-defaults=true {
locked {
bind "Ctrl g" { SwitchToMode "normal"; }
}
pane {
@AxelRHD
AxelRHD / .tmux.conf
Last active January 5, 2026 15:04
tmux config
# Terminal als xterm identifizieren (wie Zellij)
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
# Status Bar
set -g status-position bottom
# Anti-Flickering
set -sg escape-time 10
set -g focus-events on
@AxelRHD
AxelRHD / app.tsx
Created November 12, 2022 12:37
Cycle.JS with JSX, Typescript and Parcel (Primer)
import { jsx, VNode } from "snabbdom";
import xs from "xstream";
import { Stream } from "xstream";
import run from "@cycle/run";
import { MainDOMSource, makeDOMDriver } from "@cycle/dom";
import { IStreams, ISources } from "./interfaces";
import { Navbar } from './components/navbar'
@AxelRHD
AxelRHD / Caddyfile
Last active November 3, 2022 19:59
Elm-SPA with Caddy Dev-Server
{
auto_https off
admin :2020
}
:1235 {
handle_path /api* {
reverse_proxy :3005 #pointing to a dev-api-server
}
@AxelRHD
AxelRHD / boilerplate.jsx
Created November 18, 2021 20:45
Cycle JS boilerplate with JSX
import xs from 'xstream';
import { run } from '@cycle/run';
import { makeDOMDriver } from '@cycle/dom';
// import { makeHTTPDriver } from '@cycle/http';
import Snabbdom from 'snabbdom-pragma';
const intent = sources => {
return {
@AxelRHD
AxelRHD / index.html
Last active January 24, 2021 00:37
Cycle JS - counter M-V-I
<!DOCTYPE html>
<html>
<head>
<script src="https://npmcdn.com/xstream@5.0.6/dist/xstream.min.js"></script>
<script src="https://npmcdn.com/@cycle/dom@10.0.0-rc34/dist/cycle-dom.min.js"></script>
<script src="https://npmcdn.com/@cycle/xstream-run@3.0.2/dist/cycle.min.js"></script>
<script src="https://npmcdn.com/@cycle/http@9.0.0-rc9/dist/cycle-http-driver.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>My HTML Boilerplate</title>
</head>
<body>
<script src="./main.js"></script>