Skip to content

Instantly share code, notes, and snippets.

View chew-z's full-sized avatar

Robert J. chew-z

View GitHub Profile
@chew-z
chew-z / SKILL.md
Created December 3, 2025 13:21
Claude skill for using Codex
name description
codex
Use Codex CLI for autonomous code analysis, refactoring, design, and implementation. Use when user asks to run codex, mentions pair programming with Codex, or requests iterative code analysis and development with session continuity.

Codex CLI Pair Programming

Codex is an advanced AI programming assistant that excels at autonomous code analysis, design, and implementation through iterative consultation with self-constructed quality standards.

Core Capabilities

@chew-z
chew-z / main.go
Created September 25, 2025 20:05
Upload PDF and ask question vs OpenAI Responses API
package main
import (
"context"
"fmt"
"log"
"os"
"path/filepath"
"strings"
@chew-z
chew-z / music.10s.sh
Last active March 15, 2024 13:19
Music plugin for Swiftbar
#!/bin/zsh
# metadata
# <xbar.title>Music Now Playing</xbar.title>
# <xbar.version>v1.2</xbar.version>
# <xbar.author>Dan Turkel, Jason Tokoph, Aleš Farčnik, Jeffrey Munowitch</xbar.author>
# <xbar.author.github>chew-z</xbar.author.github>
# <xbar.desc>Display currently playing Music song with artwork. Play/pause, skip forward, skip backward.</xbar.desc>
# <xbar.dependencies>zsh, javascript, JXA</xbar.dependencies>
package main
import (
"fmt"
"log"
"net/http"
"os"
"strings"
"time"
package sunset
import (
"encoding/json"
"fmt"
"log"
"net/http"
"reflect"
"time"
steps:
- name: 'gcr.io/cloud-builders/gcloud'
args: ['functions', 'deploy', 'HelloHTTP', '--trigger-http', '--runtime', 'go111', '--entry-point', 'HelloHTTP', '--region', 'europe-west1']
dir: 'CloudFunctions'
@chew-z
chew-z / default
Created March 16, 2019 17:36
Minimal nginx for DNS-over-TLS and DNS-over-HTTP
upstream dns-backend {
server 127.0.0.1:8053;
}
# http-redirects to https - for domain calls not via IP
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name www.example.com;
#!/bin/env zsh
mkdir -p chrome-crx
id=$1
downloadUrl="https://clients2.google.com/service/update2/crx?response=redirect&prodversion=56.0&x=id%3D$id%26installsource%3Dondemand%26lang%3Den-US%26uc"
if [ ! -f "chrome-crx/$id.crx" ]; then
http --download --output "chrome-crx/$id.crx" "$downloadUrl"
fi
@chew-z
chew-z / hosts2dnscrypt.py
Last active November 2, 2017 12:23
Script for downloading list of host and IP blocks
#!/usr/bin/env python
# Takes hosts file and converts to DNSCrypt blacklist-domains file
# so you could block malicious hosts on DNSCrypt
# (when alternating to DNSCrypt instead of dnsmasq in my scenario)
# hosts file from https://github.com/StevenBlack/hosts
# See https://dnscrypt.org/ IP/domain names blocking
import re
@chew-z
chew-z / radio.json
Last active January 10, 2023 16:47
Simplistic script for playing radio in terminal with mpv underneath
[
{
"id": 0,
"station": {
"name": "Machine Geist",
"url": "http://178.209.52.163:7331/maschinengeist.org.128.aacp"
}
},
{
"id": 1,