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
(.name // "Unknown") as $n |
(.mana_cost // ((.card_faces // []) | map(.mana_cost) | join(" // "))) as $mc |
(.type_line // ((.card_faces // []) | map(.type_line) | join(" // "))) as $t |
(.oracle_text // ((.card_faces // []) | map(.oracle_text) | join(" — "))) as $o |
(if .power then "\(.power)/\(.toughness)" else ((.card_faces // []) | map(select(.power)) | map("\(.power)/\(.toughness)") | .[0]) end) as $pt |
($o \vert{} gsub("\n"; " ")) as $clean_o |
"* **\($n)**"
+ (if $mc != "" and $mc != null then " | Cost: `\($mc)`" else "" end)
+ " | Type: \($t)"
@juliangroen
juliangroen / search_mtg.py
Last active September 27, 2026 02:28
mtg search
import argparse
import json
import os
import sys
# Suppress PyTorch and HuggingFace parallel threading overhead in Termux
os.environ["TOKENIZERS_PARALLELISM"] = "false"
os.environ["OMP_NUM_THREADS"] = "1"
from google import genai
@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 / 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 / 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 April 13, 2025 16:22
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