Working Notes: a commonplace notebook for recording & exploring ideas.
Home. Site Map. Subscribe. More at expLog.
— Kunal
While doing some mildly complex but repetitive work I found out about Kubernetes' Python API and was overjoyed: using a notebook to maintain a snapshot of the state I'm working with, doing deeper queries to confirm I'm not missing anything and being able to write useful scripts around it was extremely fun.
Picked up some books I've had for a long time and finally revisiting:
Every time I've used socat I've been amazed at just how powerful and convenient it is. Today's instance was for building a solution to using tramp more easily over et. So far I've relied on forwarding the remote ssh port locally, and then using a simple ssh connection but it seemed terribly wasteful.
I thought I'd need to implement my own thing as a solution to getting a shell over a port, but then Claude taught me that I can pull this off just by using socat to build me a shell. I'm saving a summary of the conversation here in case you want to see the full thing; the tiny bit showing off the what's possible:
# et connection
et <host> -t 9999:9999
# Remote server
socat TCP-LISTEN:9999,bind=127.0.0.1,reuseaddr,fork EXEC:/bin/bash,pty,stderr,setsid,sigint,sane
# Local client
socat - TCP:localhost:9999
The discussion with socat finally pushed me over the edge or adding an AI section to this notebook where I can preserve interesting conversations and references without having to include a lot of caveats in these notes. There are several conversations with chat bots I'd like to retain, but at the same time want to clearly identify that they come from a chatbot.