Skip to content

Instantly share code, notes, and snippets.

View juliangroen's full-sized avatar
🌸
░▒▓ CODING DREAMS ▓▒░

Julian Groen juliangroen

🌸
░▒▓ CODING DREAMS ▓▒░
View GitHub Profile
@juliangroen
juliangroen / md_toc.py
Last active May 22, 2024 20:33
Markdown TOC Maker
import re
import sys
from pathlib import Path
def parse_markdown_for_toc(markdown_content):
heading_pattern = re.compile(r'^(#{1,})\s+(.+?)(\s*)$', re.MULTILINE)
toc = []
for match in heading_pattern.finditer(markdown_content):
@juliangroen
juliangroen / handout.md
Created November 10, 2023 16:35
workshop 4 handout
@juliangroen
juliangroen / mockmetadata.md
Last active March 8, 2023 15:50
Mock Metadata For AWS Resources

Infrastructure

ECS Cluster

{
  "ClusterName": "snail-cluster",
  "ClusterArn": "arn:aws:ecs:us-west-2:123456789012:cluster/snail-cluster",
  "Status": "ACTIVE",
  "RegisteredContainerInstancesCount": 3,
  "RunningTasksCount": 2,
@juliangroen
juliangroen / archinstall_guide.md
Last active February 15, 2023 22:41
Basic instructions for installing Arch Linux using the builtin "archinstall" script.

Installing Arch Linux via the built in archinstall script

Note: This assumes that you have written the archlinux ISO to USB/Optical media and have booted into the live environment.

You should be at a CLI terminal that is showing the following prompt:

root@archiso ~ #
@juliangroen
juliangroen / hexer.py
Created February 1, 2023 07:24
chatGPT created python script to convert binary file to hex output similar to xxd
import sys
def read_binary_file_to_hex(filename):
with open(filename, 'rb') as binary_file:
data = binary_file.read()
hex_data = data.hex()
block_size = 32
offset = 0
for i in range(0, len(hex_data), block_size):
block = hex_data[i:i + block_size]
@juliangroen
juliangroen / test.yaml
Created January 30, 2023 18:05
Test Deployment Manifest
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: nginx
name: nginx
namespace: ballista
spec:
replicas: 1
@juliangroen
juliangroen / cka_notes.md
Last active January 10, 2023 20:28
CKA Notes

Certified Kubernetes Administrator

kubectl notes

jsonpath filtering/searching/etc

  • syntax is similar to jq selectors
  • jsonpath root is represented by a $ but it not required.
  • when the output of a kubectl command is a list of items .items[*] must be used first.
@juliangroen
juliangroen / guide.md
Last active March 26, 2024 09:29
Using Lima-vm to replace Docker Desktop on macOS

Replacing Docker Desktop with Lima-vm on macOS

Uninstall Docker Desktop

Navigate to Applications in Finder and drag "Docker" to the trash can

Remove Docker config file

mv ~/.docker/config.json ~/.docker/old-config.json

@juliangroen
juliangroen / .bashrc
Created September 1, 2021 21:57
Solution for pyright language server error "can't find module 'worker_threads'"
export NODE\_OPTIONS=--experimental-worker
@juliangroen
juliangroen / passphrase.sh
Created August 27, 2021 04:19
get four words for passphrase from /usr/share/dict/words (lowercase, non-posessive, min 4 letters, max 8 letters)
#!/bin/sh
shuf /usr/share/dict/words | grep -E "^[a-z]{4,8}$" | head -4