Skip to content

Instantly share code, notes, and snippets.

View Ch4ni's full-sized avatar

Ada Ch4ni

View GitHub Profile
@Ch4ni
Ch4ni / upgradeEks.sh
Last active August 19, 2025 03:46
Upgrade EKS script - automate upgrading k8s clusters in AWS
#! /usr/bin/env bash
# Set the target k8s verson for upgrade (must be max of current version+1)
# TODO: fetch the k8s version (server) using kubectl, parse/increment, and set this
TGT_K8S_VERSION=${TGT_K8S_VERSION:-1.26}
# build the cluster name. Doing it this way makes it a lot easier to run updates on
# multiple clusters with names we may or may not have at the time of writing this script.
TGT_K8S_CLUSTER="${TGT_K8S_CLUSTER:-${TGT_K8S_CLUSTER_PREFIX:+${TGT_K8S_CLUSTER_PREFIX}${SEPARATOR}}${TGT_ENV:-dev}${TGT_K8S_CLUSTER_SUFFIX:+${SEPARATOR}${TGT_K8S_CLUSTER_SUFFIX}}}"
@Ch4ni
Ch4ni / EntitySortUtils.ts
Last active September 10, 2025 22:35
a slightly generic sorting utilities class
export interface SortableWithId {id: string};
export interface DateSortable extends SortableWithId { date: Date };
export interface LexoRankSortable extends SortableWithId { lexoRank: string };
export type SortFunction = (a: any, b: any) => number;
export class EntitySortUtils {
private static readonly defaultSubSort = (_a: any, _b: any) => 0;
@Ch4ni
Ch4ni / readme.md
Last active April 1, 2024 17:46
Swagger references in postman docs

Postman Documentation Updates - Swagger is Superceded by OpenAPI Spec 3.x

While looking through the postman website, I noticed that the Integrations page has an entry for APIMatic. This page excerpt mentions Swagger, but not OpenAPI which now supercedes the Swagger specification (the Chrome browser will scroll to the right section. In Firefox search for text "How is the OpenAPI Specification different from Swagger"). The APIMatic documentation lists support for both Swagger and OpenAPI Specifications.

To determine the scope of work required to submit a PR, it seemed like a good idea to check if there were any other places that may be affected.

Methodology

Using ZSH and

@Ch4ni
Ch4ni / boot.py
Last active October 10, 2023 00:04
# Ada's boot.py for CRKBD, Left Hand Side on KMK w/ BoardSource Blok
# Just getting started:
# If key(0,0) is pressed, use the default boot mode. Otherwise
# boot without serial console or storage device.
import board
import storage
from kmk.bootcfg import bootcfg