Skip to content

Instantly share code, notes, and snippets.

View jwmatthews's full-sized avatar

John Matthews jwmatthews

View GitHub Profile

Example of running Qwen3-Coder-30B-A3B-Instruct-4bit via vllm with opencode on a m4 max with 128GB RAM

Run the model locally with vllm-metal

$ cat serve_qwen3-30b.sh
#!/bin/bash
export PATH="/Users/jmatthews/.venv-vllm-metal/bin:$PATH"
ulimit -n 24576

exec vllm serve mlx-community/Qwen3-Coder-30B-A3B-Instruct-4bit \

Codex Profiles to separate personal and work token consumption from OpenAI

These notes are a work in process to help create some structure around separating token consumption for personal explorations from work related tasks. The assumption is that the token budget is handled separately from either.

  • Personal access - uses an OpenAI personal subscription
  • Work access - uses an API key

Approach

The simple approach is to allow the "default" mode of invoking codex to use the personal subscription which has been logged in with oauth. Then create a new codex profile and use that with the API key in the environment.

#!/bin/bash
# Check whether OADP in the redhat-operators catalog uses olm.csv.metadata or olm.bundle.object
# and whether olm.package.icon is set
CATALOG_POD=$(oc get pods -n openshift-marketplace -l olm.catalogSource=redhat-operators \
-o jsonpath='{.items[0].metadata.name}')
echo "Pod: $CATALOG_POD"
echo
NS=openshift-marketplace
DEFAULT_SHA=a43b81d9c7a9acaee3935789813a5b6f0bdaa73488e113f60bdfd463e8acb7c8 # 799-byte gray default
echo "### 1. Collision census — how many sources serve each package"
for PKG in lvms-operator leader-worker-set run-once-duration-override-operator \
node-healthcheck-operator machine-deletion-remediation self-node-remediation storage-based-remediation dynatrace-operator; do
n=$(oc get packagemanifests -n $NS -o json \
| jq -r --arg p "$PKG" '[.items[]|select(.metadata.name==$p)]|length')
srcs=$(oc get packagemanifests -n $NS -o json \
| jq -r --arg p "$PKG" '.items[]|select(.metadata.name==$p)|.status.catalogSource' | paste -sd, -)

Artistic Style Prompt Template

Create a polished infographic-style conceptual illustration in a whimsical hand-drawn whiteboard/cartoon aesthetic designed for enterprise technology strategy presentations.

The visual style should combine:

  • modern enterprise architecture concepts
  • playful explanatory whiteboard illustration
  • clean infographic storytelling
  • emotionally readable conceptual metaphors
  • approachable but technically sophisticated tone
- ruleID: sd-prop-moved-accordion-isexpanded-from-toggle-to-item
labels:
- source=semver-analyzer
- change-type=prop-moved
- package=@patternfly/react-core
- family=Accordion
effort: 3
category: mandatory
description: The `isExpanded` prop moved from <AccordionToggle> to <AccordionItem>
message: |-
This file has been truncated, but you can view the full file.
- ruleID: semver-packages-react-charts-src-components-chart-chart-d-ts-chartprops-removed
labels:
- source=semver-analyzer
- change-type=removed
- kind=interface
- has-codemod=false
- package=@patternfly/react-charts
- family=Chart
effort: 5
category: mandatory
This file has been truncated, but you can view the full file.
{
"sd-test-menuitem-aria-aria-hidden-anglerighticon-removed": {
"strategy": "LlmAssisted",
"source_package": "@patternfly/react-core"
},
"semver-css-class-rename-u-display-inline-block-on-lg": {
"strategy": "CssVariablePrefix",
"from": "pf-v5-u-display-inline-block-on-lg",
"to": "pf-v6-u-display-inline-block-on-lg"
},
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PatternFly 5→6 Migration Comparison Report</title>
<style>
:root {
--bg: #0d1117;
--surface: #161b22;