Skip to content

Instantly share code, notes, and snippets.

View denzuko's full-sized avatar
💬
linkedin.com/in/denzuko

Dwight Spencer denzuko

💬
linkedin.com/in/denzuko
View GitHub Profile
@denzuko
denzuko / json.xsl
Created April 17, 2026 23:24 — forked from simahawk/json.xsl
Icecast server JSON status
# place this into /usr/share/icecast2/web/json.xsl
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output omit-xml-declaration="yes" method="text" indent="no" media-type="text/javascript" encoding="UTF-8"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/icestats">{
<xsl:for-each select="source">
"<xsl:value-of select="@mount"/>":{
"server_name":"<xsl:value-of select="server_name"/>",
"listeners":"<xsl:value-of select="listeners"/>",
"description":"<xsl:value-of select="server_description"/>",
@denzuko
denzuko / podcast.csh
Last active April 16, 2026 15:37
podcast mirror program in csh. Depends: *nix, xmlstarlet, and curl. Supports XDG. Use with periodic or cron. (updated for navidrome) Todo: add id3v2 for tagging
#!/bin/tcsh
##
# Podcast sync script
# version 1.2
# Copyright (C)2026 Dwight Spencer <denzuko@dapla.net>. All Rights Reserved.
# Licenced for use and distribution under the BSD 2-clause licence.
##
# Example config file:
# schema:
@denzuko
denzuko / ollama-export.sh
Created October 13, 2025 06:57 — forked from supersonictw/ollama-export.sh
Ollama Model Export Script
#!/bin/bash
# Ollama Model Export Script
# Usage: bash ollama-export.sh vicuna:7b
# SPDX-License-Identifier: MIT (https://ncurl.xyz/s/o_o6DVqIR)
# https://gist.github.com/supersonictw/f6cf5e599377132fe5e180b3d495c553
# Interrupt if any error occurred
set -e
# Declare
@denzuko
denzuko / ReadMe.md
Created September 5, 2025 11:54 — forked from arsalanses/ReadMe.md
kubernetes setup external load-balancer

haproxy and keepalived install and configuration

On API loadbalancer nodes

echo "install haproxy and keepalived service"
apt install -y haproxy keepalived

echo "copy and move haproxy config"
cat /etc/haproxy/haproxy.cfg
cat <<EOT >> /etc/haproxy/haproxy.cfg
listen Stats-Page
@denzuko
denzuko / Makefile
Last active September 5, 2025 11:44
Plan9 and OpenBSD Inspired music player
include player.mk
include example.mk
@denzuko
denzuko / Dockerfile
Last active October 29, 2023 22:28
Docker based tasks for Airflow, k8s, and nomad.
FROM python:3.9.18-alpine3.18
RUN pip install pipx invoke[invocations] scrapy scapy beautifulsoup ansible[dockerpy,pywinrm]
WORKDIR /src
COPY tasks.py /src
ENTRYPOINT invoke
CMD --list
@denzuko
denzuko / docker-swarm-architecture.md
Created October 23, 2023 04:10 — forked from scyto/docker-swarm-architecture.md
My Docker Swarm Architecture
---
## Execute: docker compose up -D ./docker-compose.yml
version: '3'
services:
autoscale:
image: gianarb/orbiter:latest
healthcheck:
test: ["CMD", "exit 0"]
interval: 25s
@denzuko
denzuko / docker-compose.yml
Created October 12, 2023 02:07 — forked from sairamkrish/docker-compose.yml
Airflow - Docker swarm setup
version: "3.8"
# This should give a high level idea of the approach.
# The complete solution is too complex and involves multiple internal microservices.
# I have tried to capture core things to consider while some else needs to achieve Docker swarm based auto scalout of workers.
services:
webserver:
image: customized/airflow:prod
environment:
@denzuko
denzuko / LICENSE
Last active June 9, 2023 02:37 — forked from justjkk/LICENSE
Parsing JSON with lex and yacc
The MIT License (MIT)
Copyright (c) 2015 J Kishore Kumar
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: