Skip to content

Instantly share code, notes, and snippets.

@metacoma
metacoma / tmuxinator.scm
Last active April 10, 2025 16:35
tmuxinator guile
(use-modules
((srfi srfi-1)) ;; for iota
(ice-9 pretty-print)
(json))
;; Custom function to map with index
(define (map-indexed proc lst)
(define (iter idx lst)
(cond ((null? lst) '()) ;; end of list
(else (cons (proc idx (car lst)) (iter (+ idx 1) (cdr lst))))))
@metacoma
metacoma / host-broker.yaml
Created April 9, 2025 14:17
example tmuxinator
name: host-broker
root: ./
pre_window: |
export PAGER=cat
ns=user-bob
vm_name=ubuntu-dev
hostname=$(hostname -s)
nats_from_stream=KN_USER_BOB__HOST_UBUNTU_DEV_FROM
nats_to_stream=KN_USER_BOB__HOST_UBUNTU_DEV_TO
<map version="freeplane 1.12.1">
<!--To view this file, download free mind mapping software Freeplane from https://www.freeplane.org -->
<node TEXT="terminal" LOCALIZED_STYLE_REF="AutomaticLayout.level.root" FOLDED="false" ID="ID_1090958577" CREATED="1409300609620" MODIFIED="1740423579896">
<hook NAME="accessories/plugins/AutomaticLayout.properties" VALUE="ALL"/>
<font BOLD="true"/>
<hook NAME="MapStyle" background="#f9f9f8ff" zoom="1.5">
<properties show_icon_for_attributes="true" edgeColorConfiguration="#808080ff,#ff0000ff,#0000ffff,#00ff00ff,#ff00ffff,#00ffffff,#7c0000ff,#00007cff,#007c00ff,#7c007cff,#007c7cff,#7c7c00ff" show_tags="UNDER_NODES" show_note_icons="true" associatedTemplateLocation="template:/terminal.mm" fit_to_viewport="false" show_icons="BESIDE_NODES"/>
<tags category_separator="::"/>
<map_styles>
<map version="freeplane 1.12.1">
<!--To view this file, download free mind mapping software Freeplane from https://www.freeplane.org -->
<node TEXT="terminal" LOCALIZED_STYLE_REF="AutomaticLayout.level.root" FOLDED="false" ID="ID_1090958577" CREATED="1409300609620" MODIFIED="1740422239954">
<hook NAME="accessories/plugins/AutomaticLayout.properties" VALUE="ALL"/>
<font BOLD="true"/>
<hook NAME="MapStyle" background="#f9f9f8ff" zoom="1.5">
<properties show_icon_for_attributes="true" edgeColorConfiguration="#808080ff,#ff0000ff,#0000ffff,#00ff00ff,#ff00ffff,#00ffffff,#7c0000ff,#00007cff,#007c00ff,#7c007cff,#007c7cff,#7c7c00ff" show_tags="UNDER_NODES" show_note_icons="true" associatedTemplateLocation="template:/terminal.mm" fit_to_viewport="false" show_icons="BESIDE_NODES"/>
<tags category_separator="::"/>
<map_styles>
{
"house": {
"detail": "The house is located on Suze Robertssonstraat 7",
"link": "https://www.google.com/maps/place/Suze+Robertsonstraat+7",
"color": "red: 255, green: 120, blue: 120, alpha: 255",
@metacoma
metacoma / json
Created October 20, 2024 15:06
kando_menus.json
{"menus": [{"shortcut": "Control+Space", "shortcutID": "kando_dynamic", "centered": true, "iconTheme": "material-symbols-rounded", "root": {"type": "submenu", "name": "Kubernetes", "icon": "deployed_code", "iconTheme": "material-symbols-rounded", "children": [{"type": "command", "data": {"command": "", "delayed": false}, "name": "eventing-controller-b974797d9-tts7k", "icon": "terminal", "iconTheme": "material-symbols-rounded"}, {"type": "command", "data": {"command": "", "delayed": false}, "name": "eventing-webhook-545c79cd88-qtf95", "icon": "terminal", "iconTheme": "material-symbols-rounded"}, {"type": "command", "data": {"command": "", "delayed": false}, "name": "imc-controller-686559bb47-5db9l", "icon": "terminal", "iconTheme": "material-symbols-rounded"}, {"type": "command", "data": {"command": "", "delayed": false}, "name": "imc-dispatcher-564778f4f-rcqgp", "icon": "terminal", "iconTheme": "material-symbols-rounded"}, {"type": "command", "data": {"command": "", "delayed": false}, "name": "jetstream-ch-co
@metacoma
metacoma / modelina.java
Created July 9, 2024 17:18
modelina java output
> start
> ../../node_modules/.bin/ts-node --cwd ../../ ./examples/$npm_package_config_example_name/index.ts
public class TmuxPaneIoDocument {
@NotNull
@Size(min=1)
private String input;
@NotNull
@metacoma
metacoma / py
Created July 9, 2024 13:12
modelina python serialize/desialize
class TmuxPaneIoDocument:
def __init__(self, input):
self._input = input.input
self._output = input.output
self._ps1 = input.ps1
@property
def input(self):
return self._input
@input.setter
$ kubectl get clusterrolebinding | grep admin-binding
provider-kubernetes-admin-binding                                                ClusterRole/cluster-admin                                                                    64m
kcl-function-admin-binding                                                       ClusterRole/cluster-admin                                                                    58m
provider-helm-admin-binding                                                      ClusterRole/cluster-admin                                                                    58m
crossplane-admin-binding                                                         ClusterRole/cluster-admin                                                                    3m37s
$ kubectl apply -f xrd-claim.yaml -f function-kcl.yaml
$ kubectl apply -f resource.yaml
$ kubectl get composite
NAME             SYNCED   READY   COMPOSITION   AGE
@metacoma
metacoma / docker-compose.yaml
Created April 11, 2024 09:35
wstunnel reverse proxy example
# Save this content to the file docker-compose.yml
# docker-compose pull
# docker-compose up
# tldr
# client1 ---.
# --- internet --- aws-host:8081 --- wstunnel reverse tunnel --- internet --- wstunnel --- websocket-application:8080
# client2 ---`
version: '3'