• Home
  • Github

Graphics Unplugged

Notes on Golang, Rust, and Kubernetes

Kyle Diedrick
https://graphicsunplugged.com

Golang Kubernetes

Simple Websocket Echo Server in Go

By Kyle Diedrick on Friday, April 19, 2024
Prompt: A bunch of metal gears and pulleys on a futuristic manufacturing machine, realistic

Recently I was debugging some issues with a Websocket server. The server was running serverless via knative eventing in Kubernetes, with Istio as the gateway and some virtual service rules. The connection was failing with a 503 status and no real information. The server itself provided no information about its connections or incoming messages, so …

Continue Reading
0
Generated Images

Stable Diffusion generated notebook covers

By Kyle Diedrick on Friday, October 13, 2023

It’s always fun to try to get stable diffusion to produce some nice images, here are some of the best ones, based on this prompt: A spellbook that contains cyberpunk futuristic secret computer code snippets, with computers and code blocks on the cover, possibly some stickers. This notebook is the prize possession of a hacker.

Continue Reading
1
MacOS Rust

Creating a MacOS .app bundle

By Kyle Diedrick on Friday, August 18, 2023
Prompt: an abstract vector art about building native apps that have icons

It took me a while to figure out all the various steps (plus a couple of key tricks!) for creating a Mac OS .app bundle to make a distributable executable. I wanted to create a distributable executable for the kube-switchboard project so it is easier to use, but I didn’t want to rely on xcode …

Continue Reading
0
Golang

Presign upload/download URLs for S3

By Kyle Diedrick on Friday, September 9, 2022

The AWS documentation for presigning URLs for file upload/download in S3 are a little sparse. The most complicated part of the project is setting up the configuration and required client objects. Once those are created using them to get the desired URLs is straightforward.

Continue Reading
0
Commands/Bash

Useful commands and other miscellany

By Kyle Diedrick on Friday, February 11, 2022

My personal set of commands I use frequently enough to want to reference but not frequently enough to have memorized. Kubernetes How to set the default namespace of a context:

Continue Reading
0
Kubernetes Rust

Getting a count of active connections in PostgreSQL

By Kyle Diedrick on Saturday, January 15, 2022

While working on my latest project in Rust with Diesel I ran into an issue when sharing a Postgres instance between two applications. The second application (in my case, Ory Kratos) was unable to establish connections to the database, telling me that there were no available connections. At first I thought maybe my Postgres database …

Continue Reading
0
Kubernetes

Run a bash shell in Kubernetes Cluster

By Kyle Diedrick on Tuesday, December 28, 2021

This is really simple. Use the kubectl run command to run a container quickly: In my case I wanted to install some tools (which since it’s an ubuntu image you can!) Or if you just need curl (and some other network diagnostic tools):

Continue Reading
0
Kubernetes

Removing url prefixes in nginx Kubernetes Ingress

By Kyle Diedrick on Saturday, December 18, 2021

Getting an NGINX ingress running on a cluster is really easy, but the documentation did not immediately tell me how to strip the path prefix off at the ingress. I know I can use something like Istio to do this for me but for this specific project I didn’t need all of the additional complexity …

Continue Reading
2
Kubernetes Rust

Run a plain SQL query in Diesel.rs

By Kyle Diedrick on Tuesday, December 14, 2021

Sometimes I just need to get a single value out of the database, or in this case I wanted to include connectivity to the database in my liveness probe. Since I don’t need to load anything and just want to make sure the database is accessible I want to run a very simple query. Diesel …

Continue Reading
0
JavaScript

React Function Components with useState

By Kyle Diedrick on Sunday, December 12, 2021

React’s Function Components make writing components really easy. They eliminate a lot of boiler plate code and confusing state management. However without hooks function components are very limited. Let’s start with a very simple example and see why the useState hook is important. Then we’ll move on to the reason for the useEffect hook.

Continue Reading
0

All images generated by Stable Diffusion

(because why not)

https://github.com/Stability-AI/stablediffusion

AWS Diesel.rs Golang Kubernetes Machine Learning Postgres React React Hooks Rocket.rs Rust

Theme by Scissor Themes Proudly powered by WordPress