Skip to content

Instantly share code, notes, and snippets.

View arockwell's full-sized avatar

Alex Rockwell arockwell

View GitHub Profile
@arockwell
arockwell / all_testing_scripts.md
Created July 18, 2025 20:12
Punchout Impersonation Fix - Testing Scripts Collection

Punchout Impersonation Fix - Testing Scripts

Collection of Ruby scripts created to test the punchout impersonation fix.

1. test_regular_user_punchout.rb

Tests regular user punchout validation to ensure regression prevention.

#!/usr/bin/env ruby
@arockwell
arockwell / punchout_admin_bypass_analysis.md
Created July 18, 2025 18:13
Punchout Admin Session Issues - Existing Solutions Analysis

Punchout Admin Session Issues - Existing Solutions Analysis

Current Problem

Admins assuming identity in punchout organizations face the issue where requires_punchout_url? returns true because current_user.cart.punchout_form_url.blank? is true, blocking their ability to work with the cart.

Existing Solutions and Patterns Found

1. Impersonation Detection Pattern (Most Relevant)

Location: app/helpers/auth_helper.rb

@arockwell
arockwell / tmpm74eko7i.md
Created July 13, 2025 07:39
Claude Code Control Center: Ultimate AI Development IDE Vision - Transform EMDX into a unified AI-powered development environment

Claude Code Control Center: The Ultimate AI Development IDE

Core Vision

Transform EMDX into a Claude Code Control Center - a unified interface where developers can seamlessly blend human planning with AI execution, creating a new paradigm for AI-assisted development.

The Big Picture

Imagine opening EMDX and seeing not just documents, but a living, breathing development ecosystem:

@arockwell
arockwell / tmp4caavfc3.md
Created July 13, 2025 07:28
EMDX Background Execution + Log Viewer Architecture - Alternative to tmux panes with async job execution
  1. Background Job Manager

    • Press key in emdx GUI → spawns background process
    • Each job gets a unique ID (maybe tied to doc ID)
    • Logs stream to files or database
  2. TUI Log Viewer (new mode in emdx)

    • Press l for "logs" view
    • Shows active/recent jobs
    • Live tail of outputs
    • Filter by document, tag, status
@arockwell
arockwell / tmp20borr7y.md
Created July 13, 2025 07:28
EMDX Tmux Integration: Next Steps Analysis - Ideas for extending tmux pane spawning functionality
tmux_command = f"claude-code --file {temp_path}"
tags = get_document_tags(doc_id)
if '🎯' in tags:  # Gameplan
    tmux_command = f"claude-code --execute-plan {temp_path}"
elif '🔍' in tags:  # Analysis
    tmux_command = f"claude-code --analyze {temp_path}"
@arockwell
arockwell / tmp6v1sx5ua.md
Created July 13, 2025 07:27
EMDX Background Jobs: Complete Implementation Guide - Architecture for async job execution with integrated log viewer

Building Background Execution + Log Viewer into EMDX

Implementation Roadmap

Phase 1: Core Infrastructure

1.1 Job Management System

# emdx/models/jobs.py
from dataclasses import dataclass
@arockwell
arockwell / tmpjkva85r5.md
Created July 8, 2025 06:43
Test public gist from emdx

emdx - Documentation Index Management System

A powerful command-line tool for managing your personal knowledge base with SQLite full-text search, Git integration, and a beautiful terminal interface.

Features

  • 🚀 Unified CLI: Single emdx command with intuitive subcommands
  • 🔍 Full-Text Search: SQLite FTS5-powered search with ranking and fuzzy matching
  • 📝 Multiple Input Methods: Save files, create notes, pipe output, or paste from clipboard
  • 🎨 Rich Terminal UI: Beautiful tables, markdown rendering, and syntax highlighting
@arockwell
arockwell / claude-knowledge-gist.md
Created July 4, 2025 05:54
PostgreSQL Knowledge Base for Millions of Markdown Files - A blazing-fast document management system with Fish shell

PostgreSQL Knowledge Base for Millions of Markdown Files

A blazing-fast markdown document management system built with PostgreSQL and Fish shell. Handles everything from personal notes to millions of documents with smart tab completion and beautiful mdcat rendering.

Features

  • 🚀 Scales to millions - Optimized indexes, parallel queries, batch operations
  • 🔍 Full-text + Fuzzy search - PostgreSQL FTS with trigram support
  • 📁 Project organization - Group documents by project with multi-level tab completion
  • Sub-second queries - Even with millions of documents
@arockwell
arockwell / hello_world.py
Created May 25, 2025 07:50
Snazzy Hello World
#!/usr/bin/env python3
"""
Hello World v2.0 - Now with 100% more snazz! ✨
"""
import random
import time
from datetime import datetime
def typewriter_effect(text, delay=0.05):
@arockwell
arockwell / gist:a6e450a1d60b99fb6c4494b6635645b9
Created May 6, 2025 00:52
Improved number parsing - balanced approach
fn number(&mut self, graphemes: &[&str]) {
let token_col = self.column - 2;
let mut is_float = false;
let mut number = graphemes[self.column - 2].to_string();
// Part 1: Handle integer part (required)
while self.consume_digits(&mut number, graphemes) {}
// Part 2: Handle decimal part (optional)
if self.column - 1 < graphemes.len() && graphemes[self.column - 1] == "." {