Skip to content

Instantly share code, notes, and snippets.

View cmwylie19's full-sized avatar

Case Wylie cmwylie19

View GitHub Profile
@cmwylie19
cmwylie19 / EXEC_PEPR_IMAGE.md
Last active January 15, 2026 15:48
execing into pepr image to debug

Read node modules:

docker run --rm --entrypoint node pepr:dev  -e "console.log(require('fs').readdirSync('node_modules').join('\n'))"

Read a node module

docker run --rm --entrypoint node pepr:dev -e "const fs=require('fs'); const p='node_modules/kubernetes-fluent-client/package.json'; const j=JSON.parse(fs.readFileSync(p,'utf8')); console.log(j.name+'@'+j.version);"
@cmwylie19
cmwylie19 / DEBUGGING_UDS_CORE.md
Created January 6, 2026 18:15
running npx pepr dev
npm run build # in pepr
rm -rf node_modules/pepr/src node_modules/pepr/dist
cp -r ~/pepr/src node_modules/pepr/src ~/pepr/dist node_modules/pepr/dist # in uds-core
node node_modules/pepr/dist/cli.js dev --yes # in uds-core
@cmwylie19
cmwylie19 / issue_creator.sh
Created October 27, 2025 21:04
create issues under epic
#!/usr/bin/env bash
set -euo pipefail
# ========= Config =========
REPO="defenseunicorns/uds-compliance"
SUBISSUE_PARENT=545 # Parent issue to attach sub-issues to
LABEL="Lula2" # Label to apply to created issues
DRY_RUN="${DRY_RUN:-1}" # Override with: DRY_RUN=0 bash issue_creator.sh
# ==========================
@cmwylie19
cmwylie19 / DEBUGGING.md
Last active January 15, 2026 15:52
uds-core
npm i --no-save pepr-0.0.0-development.tgz 
PEPR_CUSTOM_IMAGE="pepr:dev" uds run slim-dev
uds run slim-dev && k3d image import pepr:dev -c uds;
k label ns pepr-system zarf.dev/agent=ignore && \
k set image deploy/pepr-uds-core-watcher -n pepr-system watcher=pepr:dev && \
k set image deploy/pepr-uds-core -n pepr-system server=pepr:dev && \
uds run test:single-layer --set=layer=metrics-server && \
uds run test:single-layer --set=layer=monitoring 
@cmwylie19
cmwylie19 / k.md
Created June 10, 2025 17:18
kubectl run
k run --rm -i --image=nginx curler -n pepr-system -- curl -k https://pepr-uds-core/metrics 
@cmwylie19
cmwylie19 / ORAS_Pepr.md
Last active October 21, 2025 18:17
demo pushing Pepr artifacts to an oras registry, crane, oras

Run a local zot registry

docker run --platform linux/amd64 -d -p 3333:5000 --name oras-quickstart ghcr.io/project-zot/zot-linux-amd64:latest

Build Pepr image and library

npm run build:image
@cmwylie19
cmwylie19 / OrganizeRelease.js
Last active April 14, 2025 14:15
organizes github release note
const fs = require('fs');
function reorganizeChangelog(filePath) {
const changelog = fs.readFileSync(filePath, 'utf8');
const lines = changelog.split('\n');
const whatsChangedIdx = lines.findIndex(line => line.trim() === '## What\'s Changed');
if (whatsChangedIdx === -1) {
console.error('No "## What\'s Changed" section found.');
return;
@cmwylie19
cmwylie19 / nmap.md
Created April 2, 2025 11:50
find vm - nmap
nmap -p 22 192.168.6.0/24 192.168.5.0/24

# Just the IPs
nmap -p 22 --open 192.168.6.0/24 192.168.5.0/24

# Use -T4 to speed it up (aggressive timing):
nmap -p 22 --open -T4 192.168.6.0/24 192.168.5.0/24

# Or output to a grep-friendly file:
@cmwylie19
cmwylie19 / REBASE.md
Created March 31, 2025 21:07
rebase new commits over top of old commits
git merge upstream/main --allow-unrelated-histories -X theirs
@cmwylie19
cmwylie19 / PEPR_UDS_CORE.md
Created March 31, 2025 20:00
RUN UDS CORE WITH PEPR CANDIDATE
PEPR_OVERRIDE_IMAGE="pepr:dev" uds run test:uds-core-e2e --set FLAVOR=upstream --no-progress