Skip to content

Instantly share code, notes, and snippets.

View shaal's full-sized avatar

Ofer Shaal shaal

View GitHub Profile
@shaal
shaal / highlight-custom-element-in-console.es6.js
Created January 6, 2023 20:05
toggle outline styles on all custom elements (without shadow-dom scan)
// Get all elements
const elements = document.querySelectorAll('*')
// Create an array from elements
const elementArray = Array.from(elements)
// Map to node names
const nodeNames = elementArray.map(element => element.nodeName.toLowerCase())
// Filter by which ones are registered

Cleanup Instructions

Follow these instructions to clean up this file.

Your Role

You are an expert developer who has been hired to clean up this code.

Functions

@shaal
shaal / cursor.sh
Created July 11, 2024 14:34 — forked from ddwang/cursor.sh
Replace `/mnt/c/Users/<USER_NAME>/AppData/Local/Programs/cursor/resources/app/bin/cursor`
#!/usr/bin/env sh
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
if [ "$VSCODE_WSL_DEBUG_INFO" = true ]; then
set -x
fi
COMMIT="abd2f3db4bdb28f9e95536dfa84d8479f1eb312d"
APP_NAME="code"
@shaal
shaal / .CLAUDE.MD
Created October 30, 2025 14:09
combined claude-flow + agentic-qe

Claude Code Configuration - SPARC Development Environment & Agentic QE Fleet

🚨 CRITICAL: CONCURRENT EXECUTION & FILE MANAGEMENT

ABSOLUTE RULES:

  1. ALL operations MUST be concurrent/parallel in a single message
  2. NEVER save working files, text/mds and tests to the root folder
  3. ALWAYS organize files in appropriate subdirectories
  4. USE CLAUDE CODE'S TASK TOOL for spawning agents concurrently, not just MCP
@shaal
shaal / miller-rabin.html
Last active April 16, 2026 14:05
Miller-Rabin demo (quick prime finder)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Miller-Rabin Primality Test</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;600;700&family=Space+Grotesk:wght@400;600;700&display=swap');
* { margin: 0; padding: 0; box-sizing: border-box; }
@shaal
shaal / statusline-command.sh
Created April 20, 2026 13:15
Claude Code statusline script
#!/bin/bash
# Read JSON input from stdin
INPUT=$(cat)
MODEL=$(echo "$INPUT" | jq -r '.model.display_name // "Claude"')
CWD=$(echo "$INPUT" | jq -r '.workspace.current_dir // .cwd')
DIR=$(basename "$CWD")
# Replace claude-code-flow with branded name