file_path
stringlengths
3
280
file_language
stringclasses
66 values
content
stringlengths
1
1.04M
repo_name
stringlengths
5
92
repo_stars
int64
0
154k
repo_description
stringlengths
0
402
repo_primary_language
stringclasses
108 values
developer_username
stringlengths
1
25
developer_name
stringlengths
0
30
developer_company
stringlengths
0
82
test/simple-node-repl-test.js
JavaScript
import { replManager } from '../dist/repl-manager.js'; async function testNodeREPL() { try { console.log('Creating a Node.js REPL session...'); const pid = await replManager.createSession('node', 5000); console.log(`Created Node.js REPL session with PID ${pid}`); console.log('Executing a simple...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/simple-python-test.js
JavaScript
import { executeCommand, readOutput, forceTerminate } from '../dist/tools/execute.js'; import { sendInput } from '../dist/tools/send-input.js'; async function simplePythonTest() { try { console.log("Starting Python with a simple command..."); // Run Python with a print command directly const r...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/simple-repl-test.js
JavaScript
import { replManager } from '../dist/repl-manager.js'; async function testBasicREPL() { try { console.log('Creating a Python REPL session...'); const pid = await replManager.createSession('python', 5000); console.log(`Created Python REPL session with PID ${pid}`); console.log('Executing a simpl...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-allowed-directories.js
JavaScript
/** * Test script for allowedDirectories configuration functionality * * This script tests how different allowedDirectories settings affect file access: * 1. Testing file access with empty allowedDirectories array (should allow full access) * 2. Testing file access with specific directory in allowedDirectories *...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-blocked-commands.js
JavaScript
/** * Test script for blockedCommands configuration functionality * * This script tests how blockedCommands settings affect command execution: * 1. Testing execution of non-blocked commands * 2. Testing execution of blocked commands * 3. Testing updated blockedCommands list * 4. Testing empty blockedCommands ar...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-blocklist-bypass.js
JavaScript
/** * Tests for command blocklist bypass fixes * Covers: absolute path bypass (#218), command substitution bypass (#217) */ import assert from 'assert'; import { commandManager } from '../dist/command-manager.js'; async function runTests() { // mock config with blocked commands const blockedCmds = ['sudo',...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-conditional-tools.js
JavaScript
#!/usr/bin/env node /** * Test: Verify conditional tool registration based on client name * Tests that give_feedback_to_desktop_commander is excluded for desktop-commander client */ import { Client } from "@modelcontextprotocol/sdk/client/index.js"; import { StdioClientTransport } from "@modelcontextprotocol/sdk/cl...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-default-shell.js
JavaScript
/** * Test script for defaultShell configuration functionality * * This script tests how defaultShell settings affect command execution: * 1. Testing execution with /bin/sh as default shell * 2. Testing execution with bash as default shell * 3. Testing shell changes are properly applied * 4. Testing restoration...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-directory-creation.js
JavaScript
/** * Test script for directory creation functionality * * This script tests the create_directory functionality by: * 1. Testing creation of a directory with an existing parent * 2. Testing creation of a directory with a non-existent parent path * 3. Testing nested directory creation */ // Import the filesyste...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-edit-block-line-endings.js
JavaScript
/** * Test script for edit_block functionality with different line endings * * This script tests how edit_block handles files with different line ending styles: * 1. Files with LF line endings (Unix/Linux) * 2. Files with CRLF line endings (Windows) * 3. Files with CR line endings (Old Mac) * 4. Files with mixe...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-edit-block-occurrences.js
JavaScript
/** * Test script for edit_block functionality with multiple occurrences * * This script tests how edit_block handles multiple occurrences: * 1. Testing failure when more occurrences than expected * 2. Testing failure when fewer occurrences than expected * 3. Testing success when exactly the right number of occu...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-enhanced-repl.js
JavaScript
import assert from 'assert'; import { execSync } from 'child_process'; import { startProcess, readProcessOutput, forceTerminate, interactWithProcess } from '../dist/tools/improved-process-tools.js'; /** * Determines the correct python command to use * @returns {string} 'python3' or 'python' */ function getPythonCom...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-error-sanitization.js
JavaScript
import assert from 'assert'; import path from 'path'; // Local implementation of sanitizeError for testing // This mirrors the implementation in src/utils/capture.ts but avoids import issues // when running tests. The actual sanitization logic is identical. // // NOTE: If you update the sanitizeError function in src/...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-excel-files.js
JavaScript
/** * Test script for Excel file handling functionality * * This script tests the ExcelFileHandler implementation: * 1. Reading Excel files (basic, sheet selection, range, offset/length) * 2. Writing Excel files (single sheet, multiple sheets, append mode) * 3. Editing Excel files (range updates) * 4. Getting Ex...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-file-handlers.js
JavaScript
/** * Test script for file handler system * * This script tests the file handler architecture: * 1. File handler factory returns correct handler types * 2. FileResult interface consistency * 3. ReadOptions interface usage * 4. Handler canHandle() method * 5. Text file handler basic operations * 6. Image file h...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-home-directory.js
JavaScript
/** * Test script for home directory (~) path handling * * This script tests the tilde expansion and path validation with: * 1. Testing tilde (~) expansion in paths * 2. Testing tilde with subdirectory (~/Documents) expansion * 3. Testing tilde expansion in the allowedDirectories configuration * 4. Testing file...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-literal-search.js
JavaScript
/** * Test for literal search functionality - testing regex vs literal string matching */ import path from 'path'; import fs from 'fs/promises'; import { fileURLToPath } from 'url'; import { handleStartSearch, handleGetMoreSearchResults, handleStopSearch } from '../dist/handlers/search-handlers.js'; import { configM...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-negative-offset-analysis.js
JavaScript
/** * Test Results: Negative Offset Analysis for read_file * * FINDINGS: * ❌ Negative offsets DO NOT work correctly in the current implementation * ❌ They return empty content due to invalid slice() range calculations * ⚠️ The implementation has a bug when handling negative offsets * * CURRENT BEHAVIOR: * -...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-negative-offset-readfile.js
JavaScript
/** * Test script for negative offset handling in read_file * * This script tests: * 1. Whether negative offsets work correctly (like Unix tail) * 2. How the tool handles edge cases with negative offsets * 3. Comparison with positive offset behavior * 4. Error handling for invalid parameters */ import { confi...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-node-repl.js
JavaScript
/** * Specialized test for Node.js REPL interaction * This test uses a direct approach with the child_process module * to better understand and debug Node.js REPL behavior */ import { spawn } from 'child_process'; import fs from 'fs/promises'; import path from 'path'; import { fileURLToPath } from 'url'; // Get d...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-pdf-creation.js
JavaScript
#!/usr/bin/env node /** * Test script for PDF creation functionality * Creates PDF from markdown string and verifies it */ import { writePdf } from '../dist/tools/filesystem.js'; import fs from 'fs/promises'; import path from 'path'; import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.met...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-pdf-parsing.js
JavaScript
#!/usr/bin/env node /** * Test script for PDF parsing functionality using @opendocsg/pdf2md (v3) * Verifies parsing of sample PDFs and URL */ import { parsePdfToMarkdown } from '../dist/tools/pdf/index.js'; import path from 'path'; import { fileURLToPath } from 'url'; import fs from 'fs/promises'; const __filenam...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-process-pagination.js
JavaScript
import assert from 'assert'; import { startProcess, readProcessOutput, interactWithProcess } from '../dist/tools/improved-process-tools.js'; /** * Test suite for process output pagination features * Tests offset/length parameters and context overflow protection */ // Helper to extract PID from start result functio...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-read-completed-process.js
JavaScript
import assert from 'assert'; import { startProcess, readProcessOutput } from '../dist/tools/improved-process-tools.js'; /** * Proper test for read_process_output on completed processes * * This test should: * - FAIL when the bug exists (current behavior) * - PASS when the bug is fixed (desired behavior) */ as...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-repl-interaction.js
JavaScript
import path from 'path'; import { fileURLToPath } from 'url'; import fs from 'fs/promises'; import { configManager } from '../dist/config-manager.js'; import { terminalManager } from '../dist/terminal-manager.js'; // Get directory name const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-search-code-edge-cases.js
JavaScript
/** * Additional comprehensive tests for search functionality using new streaming API * These tests cover edge cases and advanced scenarios */ import path from 'path'; import fs from 'fs/promises'; import { fileURLToPath } from 'url'; import { handleStartSearch, handleGetMoreSearchResults, handleStopSearch } from '...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-search-code.js
JavaScript
/** * Unit tests for search functionality using new streaming search API */ import path from 'path'; import fs from 'fs/promises'; import { fileURLToPath } from 'url'; import { handleStartSearch, handleGetMoreSearchResults, handleStopSearch } from '../dist/handlers/search-handlers.js'; import { configManager } from ...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-symlink-security.js
JavaScript
/** * Test script for symlink security in validatePath * * This script tests that symlinks cannot be used to bypass allowedDirectories restrictions. * The attack scenario: * 1. User configures allowedDirectories to ["/allowed"] * 2. Attacker creates symlink: /allowed/evil → /etc/passwd (or other restricted path)...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test-ui-event-tracking.js
JavaScript
/** * Tests for UI event tracking plumbing between apps and host interfaces. It verifies expected event envelopes so telemetry and diagnostics remain stable. */ import assert from 'assert'; import { server } from '../dist/server.js'; import { buildTrackUiEventCapturePayload } from '../dist/handlers/history-handlers....
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test.js
JavaScript
import path from 'path'; import fs from 'fs/promises'; import { fileURLToPath } from 'url'; import { handleEditBlock } from '../dist/handlers/edit-search-handlers.js'; import { configManager } from '../dist/config-manager.js'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filenam...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test_enhanced_read.js
JavaScript
// Test script to verify enhanced file reading import { readFileInternal } from '../dist/tools/filesystem.js'; import { fileURLToPath } from 'url'; import { dirname, join } from 'path'; // Get the test directory path const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); const TEST_F...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test_improved_search_truncation.js
JavaScript
// Test script to verify improved search result behavior using new streaming API import { handleStartSearch, handleGetMoreSearchResults, handleStopSearch } from '../dist/handlers/search-handlers.js'; /** * Helper function to wait for search completion and get all results */ async function searchAndWaitForCompletion(...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
test/test_search_truncation.js
JavaScript
// Test script to verify search result behavior using new streaming API import { handleStartSearch, handleGetMoreSearchResults } from '../dist/handlers/search-handlers.js'; /** * Helper function to wait for search completion and get all results */ async function searchAndWaitForCompletion(searchArgs, timeout = 30000...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
track-installation.js
JavaScript
#!/usr/bin/env node /** * Installation Source Tracking Script * Runs during npm install to detect how Desktop Commander was installed * * Debug logging can be enabled with: * - DEBUG=desktop-commander npm install * - DEBUG=* npm install * - NODE_ENV=development npm install * - DC_DEBUG=true npm install */ ...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
uninstall-claude-server.js
JavaScript
import { homedir, platform } from 'os'; import fs from 'fs/promises'; import path from 'path'; import { join } from 'path'; import { readFileSync, writeFileSync, existsSync, appendFileSync, mkdirSync } from 'fs'; import { fileURLToPath } from 'url'; import { dirname } from 'path'; import { exec } from "node:child_proce...
wonderwhy-er/DesktopCommanderMCP
5,467
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities
TypeScript
wonderwhy-er
Eduard Ruzga
app.js
JavaScript
// DOM Elements const video = document.getElementById('webcam'); const drawingCanvas = document.getElementById('drawing-canvas'); const handsCanvas = document.getElementById('hands-canvas'); const colorPicker = document.getElementById('color-picker'); const cameraSelect = document.getElementById('camera-select'); const...
wonderwhy-er/camera-geasture-drawing
8
web app with webcam that does drawing with hand gestures
JavaScript
wonderwhy-er
Eduard Ruzga
index.html
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Hand Gesture Drawing</title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="container"> <div class="video-container"> ...
wonderwhy-er/camera-geasture-drawing
8
web app with webcam that does drawing with hand gestures
JavaScript
wonderwhy-er
Eduard Ruzga
style.css
CSS
* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: Arial, sans-serif; background-color: #121212; color: #fff; overflow: hidden; } .container { display: flex; height: 100vh; } .video-container { position: relative; flex: 1; overflow: hidden; } #we...
wonderwhy-er/camera-geasture-drawing
8
web app with webcam that does drawing with hand gestures
JavaScript
wonderwhy-er
Eduard Ruzga
index.html
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>AI News Report | January 2026</title> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" cross...
wonderwhy-er/cowork-news-report
0
AI News Report January 2026 - A beautiful dark-themed webpage summarizing latest AI developments
HTML
wonderwhy-er
Eduard Ruzga
index.html
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>DevOps Demo - GitHub Actions</title> <link rel="stylesheet" href="styles.css"> </head> <body> <header> <h1>🚀 DevOps Demo Project</h1> <p>Showc...
wonderwhy-er/devops-demo
1
DevOps demo project with GitHub Actions CI/CD pipeline
JavaScript
wonderwhy-er
Eduard Ruzga
lint.js
JavaScript
// Simple linter to check code quality const fs = require('fs'); console.log('🔍 Running code linting...\n'); let issues = 0; function checkFile(filename, rules) { if (!fs.existsSync(filename)) { console.log(`⚠️ File ${filename} not found`); return; } const content = fs.readFileSync...
wonderwhy-er/devops-demo
1
DevOps demo project with GitHub Actions CI/CD pipeline
JavaScript
wonderwhy-er
Eduard Ruzga
script.js
JavaScript
// Calculator functionality function calculate() { const num1 = parseFloat(document.getElementById('num1').value); const num2 = parseFloat(document.getElementById('num2').value); const operation = document.getElementById('operation').value; const resultDiv = document.getElementById('result'); /...
wonderwhy-er/devops-demo
1
DevOps demo project with GitHub Actions CI/CD pipeline
JavaScript
wonderwhy-er
Eduard Ruzga
styles.css
CSS
* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Arial', sans-serif; line-height: 1.6; color: #333; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; } header { text-align: center; padding: 2rem; background: rgba(255,...
wonderwhy-er/devops-demo
1
DevOps demo project with GitHub Actions CI/CD pipeline
JavaScript
wonderwhy-er
Eduard Ruzga
test.js
JavaScript
// Simple test runner (no external dependencies) const { add, subtract, multiply, divide } = require('./script.js'); console.log('🧪 Running tests...\n'); let passed = 0; let failed = 0; function test(description, actual, expected) { if (actual === expected) { console.log(`✅ ${description}: PASSED`); ...
wonderwhy-er/devops-demo
1
DevOps demo project with GitHub Actions CI/CD pipeline
JavaScript
wonderwhy-er
Eduard Ruzga
index.html
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>DevOps Demo Project</title> <link rel="stylesheet" href="styles.css"> </head> <body> <header> <h1>🚀 DevOps Demo Project</h1> <p>Demonstrating ...
wonderwhy-er/devops-demo-project
0
A demonstration project showcasing DevOps practices with GitHub Actions
JavaScript
wonderwhy-er
Eduard Ruzga
script.js
JavaScript
// DevOps Demo Project JavaScript document.addEventListener('DOMContentLoaded', function() { // Update the last updated timestamp const lastUpdatedElement = document.getElementById('last-updated'); const now = new Date(); lastUpdatedElement.textContent = now.toLocaleDateString() + ' ' + now.toLocaleTime...
wonderwhy-er/devops-demo-project
0
A demonstration project showcasing DevOps practices with GitHub Actions
JavaScript
wonderwhy-er
Eduard Ruzga
styles.css
CSS
/* DevOps Demo Project Styles */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; color: #333; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; } header { tex...
wonderwhy-er/devops-demo-project
0
A demonstration project showcasing DevOps practices with GitHub Actions
JavaScript
wonderwhy-er
Eduard Ruzga
tests/basic.test.js
JavaScript
// Simple test for JavaScript functions // These tests can be run in Node.js environment // Mock the browser environment for testing global.window = { fs: { readFile: jest.fn() } }; global.document = { addEventListener: jest.fn(), getElementById: jest.fn(), querySelectorAll: jest.fn(), ...
wonderwhy-er/devops-demo-project
0
A demonstration project showcasing DevOps practices with GitHub Actions
JavaScript
wonderwhy-er
Eduard Ruzga
index.html
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- SEO Meta Tags --> <title>AI Token Efficiency: JSON vs XML vs YAML vs Markdown - Which Format Saves More Money?</title> <meta name="description" content="Com...
wonderwhy-er/format-token-comparison
3
🔢 AI Token Efficiency: Compare JSON, XML, and YAML formats for OpenAI API cost optimization
HTML
wonderwhy-er
Eduard Ruzga
css/style.css
CSS
/* Main styles for GitHub Pages DevOps Demo */ :root { --primary-color: #0366d6; --secondary-color: #24292e; --light-color: #f6f8fa; --text-color: #24292e; --link-color: #0366d6; --border-color: #e1e4e8; } * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family...
wonderwhy-er/github-pages-devops-demo
0
HTML
wonderwhy-er
Eduard Ruzga
index.html
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>GitHub Pages DevOps Demo</title> <link rel="stylesheet" href="css/style.css"> </head> <body> <div class="container"> <header> <h1>GitHub Pa...
wonderwhy-er/github-pages-devops-demo
0
HTML
wonderwhy-er
Eduard Ruzga
js/main.js
JavaScript
// Main JavaScript for GitHub Pages DevOps Demo document.addEventListener('DOMContentLoaded', () => { // Set the current year in the footer const yearElement = document.getElementById('current-year'); if (yearElement) { yearElement.textContent = `© ${new Date().getFullYear()}`; } // Set th...
wonderwhy-er/github-pages-devops-demo
0
HTML
wonderwhy-er
Eduard Ruzga
data/methodology.html
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Methodology - LLM Value Comparison</title> <style> @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&display=sw...
wonderwhy-er/llm-value-comparison
1
Interactive calculator comparing local LLM vs cloud subscription value
HTML
wonderwhy-er
Eduard Ruzga
index.html
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>LLM Value Comparison: Local vs Subscription vs API</title> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script src="https://cdn.jsdelivr.net/...
wonderwhy-er/llm-value-comparison
1
Interactive calculator comparing local LLM vs cloud subscription value
HTML
wonderwhy-er
Eduard Ruzga
index.html
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="Compare images generated by OpenAI's DALL-E 2, DALL-E 3, and GPT-image-1 models side by side using the same prompt."> <meta property="og...
wonderwhy-er/openai-image-compare
1
HTML
wonderwhy-er
Eduard Ruzga
decode.ts
TypeScript
interface Result { index: number; rpcId: number; data: any; } export function parseBatchExecuteResponse(raw: string): Result[] { // Trim the first 2 lines // ")]}'" and an empty line const envelopesRaw = raw.split("\n").slice(2).join(""); // Load all envelopes JSON (list of envelopes) const envelopes:...
wong2/batchexecute
14
TypeScript package to ease interactions with Google's batchexecute batch RPC system
TypeScript
wong2
wong2
encode.ts
TypeScript
interface RpcRequest { id: string; args: string[]; } interface Params { host: string; app: string; rpcs: RpcRequest[]; } interface Result { url: URL; headers: Headers; body: URLSearchParams; } function generateReqId() { return Math.floor(Math.random() * 900000) + 100000; } function buildFreqList(r...
wong2/batchexecute
14
TypeScript package to ease interactions with Google's batchexecute batch RPC system
TypeScript
wong2
wong2
example.ts
TypeScript
import { parseBatchExecuteResponse, preparedBatchExecute } from "./mod.ts"; const encoded = preparedBatchExecute({ host: "chromewebstore.google.com", app: "ChromeWebStoreConsumerFeUi", rpcs: [{ id: "xY2Ddd", args: ["jjplpolfahlhoodebebfjdbpcbopcmlk"] }], }); console.log(encoded); const response = await fetch(e...
wong2/batchexecute
14
TypeScript package to ease interactions with Google's batchexecute batch RPC system
TypeScript
wong2
wong2
mod.ts
TypeScript
export { preparedBatchExecute } from "./encode.ts"; export { parseBatchExecuteResponse } from "./decode.ts";
wong2/batchexecute
14
TypeScript package to ease interactions with Google's batchexecute batch RPC system
TypeScript
wong2
wong2
.eslintrc.cjs
JavaScript
module.exports = { extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "preact"], parser: "@typescript-eslint/parser", plugins: ["@typescript-eslint"], env: { browser: true, }, root: true, rules: { "jest/no-deprecated-functions": 0, }, };
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
manifest.config.ts
TypeScript
import { defineManifest } from "@crxjs/vite-plugin"; export default defineManifest(() => { return { manifest_version: 3, name: "Browser Firewall", description: "Block any extension or website from accessing network", version: "1.0.0", icons: { 16: "src/assets/icon.png", 32: "src/asset...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
options.html
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Browser Firewall</title> </head> <body> <div id="app"></div> <script type="module" src="/src/main.tsx"></script> </body> </html>
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
postcss.config.js
JavaScript
export default { plugins: { tailwindcss: {}, autoprefixer: {}, }, }
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/background.ts
TypeScript
import Browser from "webextension-polyfill"; Browser.action.onClicked.addListener(() => { Browser.runtime.openOptionsPage(); }); Browser.runtime.onInstalled.addListener((details) => { if (details.reason === "install") { Browser.runtime.openOptionsPage(); } });
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/components/BlockForm.tsx
TypeScript (TSX)
import { block } from "@/lib/rules"; import { Extension } from "@/types"; import { useSignal } from "@preact/signals"; import { FC, useEffect } from "preact/compat"; import ExtensionSelect from "./ExtensionSelect"; import { Button } from "./ui/button"; import { Input } from "./ui/input"; import { Select, SelectContent,...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/components/BlockedItemCard.tsx
TypeScript (TSX)
import { BlockedItem, unblock } from "@/lib/rules"; import { getFaviconUrl } from "@/lib/utils"; import { Unlock } from "lucide-react"; import { useMemo } from "preact/hooks"; import { Badge } from "./ui/badge"; import { Card, CardContent, CardHeader, CardTitle } from "./ui/card"; const BlockedItemCard = ({ item }: { ...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/components/ExtensionSelect.tsx
TypeScript (TSX)
import { cn } from "@/lib/utils"; import { Extension } from "@/types"; import { useSignal } from "@preact/signals"; import { Check, ChevronsUpDown } from "lucide-react"; import { FC, useState } from "preact/compat"; import { Button } from "./ui/button"; import { Command, CommandEmpty, CommandGroup, CommandInput, Comman...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/components/ui/badge.tsx
TypeScript (TSX)
import * as React from "react" import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" const badgeVariants = cva( "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/components/ui/button.tsx
TypeScript (TSX)
import * as React from "react" import { Slot } from "@radix-ui/react-slot" import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" const buttonVariants = cva( "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors f...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/components/ui/card.tsx
TypeScript (TSX)
import * as React from "react" import { cn } from "@/lib/utils" const Card = React.forwardRef< HTMLDivElement, React.HTMLAttributes<HTMLDivElement> >(({ className, ...props }, ref) => ( <div ref={ref} className={cn( "rounded-lg border bg-card text-card-foreground shadow-sm", className )}...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/components/ui/command.tsx
TypeScript (TSX)
import * as React from "react" import { DialogProps } from "@radix-ui/react-dialog" import { Command as CommandPrimitive } from "cmdk" import { Search } from "lucide-react" import { cn } from "@/lib/utils" import { Dialog, DialogContent } from "@/components/ui/dialog" const Command = React.forwardRef< React.Element...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/components/ui/dialog.tsx
TypeScript (TSX)
import * as React from "react" import * as DialogPrimitive from "@radix-ui/react-dialog" import { X } from "lucide-react" import { cn } from "@/lib/utils" const Dialog = DialogPrimitive.Root const DialogTrigger = DialogPrimitive.Trigger const DialogPortal = ({ className, ...props }: DialogPrimitive.DialogPortal...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/components/ui/input.tsx
TypeScript (TSX)
import * as React from "react" import { cn } from "@/lib/utils" export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {} const Input = React.forwardRef<HTMLInputElement, InputProps>( ({ className, type, ...props }, ref) => { return ( <input type={type} classNam...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/components/ui/label.tsx
TypeScript (TSX)
import * as React from "react" import * as LabelPrimitive from "@radix-ui/react-label" import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" const labelVariants = cva( "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" ) const L...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/components/ui/popover.tsx
TypeScript (TSX)
import * as React from "react" import * as PopoverPrimitive from "@radix-ui/react-popover" import { cn } from "@/lib/utils" const Popover = PopoverPrimitive.Root const PopoverTrigger = PopoverPrimitive.Trigger const PopoverContent = React.forwardRef< React.ElementRef<typeof PopoverPrimitive.Content>, React.Comp...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/components/ui/scroll-area.tsx
TypeScript (TSX)
import * as React from "react" import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area" import { cn } from "@/lib/utils" const ScrollArea = React.forwardRef< React.ElementRef<typeof ScrollAreaPrimitive.Root>, React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> >(({ className, children, ...pr...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/components/ui/select.tsx
TypeScript (TSX)
import * as React from "react" import * as SelectPrimitive from "@radix-ui/react-select" import { Check, ChevronDown } from "lucide-react" import { cn } from "@/lib/utils" const Select = SelectPrimitive.Root const SelectGroup = SelectPrimitive.Group const SelectValue = SelectPrimitive.Value const SelectTrigger = R...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/components/ui/separator.tsx
TypeScript (TSX)
import * as React from "react" import * as SeparatorPrimitive from "@radix-ui/react-separator" import { cn } from "@/lib/utils" const Separator = React.forwardRef< React.ElementRef<typeof SeparatorPrimitive.Root>, React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root> >( ( { className, orientation =...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/global.css
CSS
@tailwind base; @tailwind components; @tailwind utilities; @layer base { :root { --background: 0 0% 100%; --foreground: 222.2 84% 4.9%; --card: 0 0% 100%; --card-foreground: 222.2 84% 4.9%; --popover: 0 0% 100%; --popover-foreground: 222.2 84% 4.9%; --primary: 222.2 47.4% 11.2%; ...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/lib/rules.ts
TypeScript
import Browser from "webextension-polyfill"; import { last } from "remeda"; const RULE_ID = 1; const EXT_ID_REGEX = /[a-p0-9]{32}/; async function getBlockedDomains() { const rules = await Browser.declarativeNetRequest.getDynamicRules(); return rules.flatMap((rule) => { return rule.condition.initiatorDomains ...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/lib/utils.ts
TypeScript
import { type ClassValue, clsx } from "clsx"; import { twMerge } from "tailwind-merge"; export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)); } export function getFaviconUrl(domain: string) { return `https://www.google.com/s2/favicons?domain=${domain}&sz=${128}`; }
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/main.tsx
TypeScript (TSX)
import { render } from "preact"; import { RouterProvider, createHashRouter } from "react-router-dom"; import "./global.css"; import OptionsPage, { loadAll as loadOptionsData } from "./routes/Options"; const router = createHashRouter([ { path: "/", element: <OptionsPage />, loader: () => loadOptionsData()...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/routes/Options.tsx
TypeScript (TSX)
import BlockForm from "@/components/BlockForm"; import icon from "@/assets/icon.png"; import BlockedItemCard from "@/components/BlockedItemCard"; import { Card, CardContent } from "@/components/ui/card"; import { Separator } from "@/components/ui/separator"; import { BlockedItem, getBlockedItems } from "@/lib/rules"; i...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/types.ts
TypeScript
import type Browser from "webextension-polyfill"; export type Extension = Browser.Management.ExtensionInfo;
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
src/vite-env.d.ts
TypeScript
/// <reference types="vite/client" />
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
tailwind.config.js
JavaScript
/** @type {import('tailwindcss').Config} */ module.exports = { darkMode: ["class"], content: [ './pages/**/*.{ts,tsx}', './components/**/*.{ts,tsx}', './app/**/*.{ts,tsx}', './src/**/*.{ts,tsx}', ], theme: { container: { center: true, padding: "2rem", screens: { "2xl...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
vite.config.ts
TypeScript
import { defineConfig } from "vite"; import preact from "@preact/preset-vite"; import { crx } from "@crxjs/vite-plugin"; import tsconfigPaths from "vite-tsconfig-paths"; import manifest from "./manifest.config"; // https://vitejs.dev/config/ export default defineConfig(({ mode }) => { return { plugins: [tsconfig...
wong2/browser-firewall
44
Block any extension or website from accessing network
TypeScript
wong2
wong2
example.ts
TypeScript
import { z } from "zod"; import { LiteMCP } from "./src/index.js"; const server = new LiteMCP("my-mcp", "1.0.0"); server.addTool({ name: "add", description: "Add two numbers", parameters: z.object({ a: z.number(), b: z.number(), }), execute: async (args) => { server.logger.debug("Adding two numb...
wong2/litemcp
185
A TypeScript framework for building MCP servers elegantly
TypeScript
wong2
wong2
src/cli/dev.ts
TypeScript
import { defineCommand } from "citty"; import { $ } from "execa"; export default defineCommand({ meta: { name: "dev", description: "Run server with mcp-cli", }, args: { script: { type: "positional", description: "The JavaScript or TypeScript script to run", valueHint: "server.js or ...
wong2/litemcp
185
A TypeScript framework for building MCP servers elegantly
TypeScript
wong2
wong2
src/cli/index.ts
TypeScript
#!/usr/bin/env node import { defineCommand, runMain } from "citty"; import dev from "./dev.js"; import inspect from "./inspect.js"; const main = defineCommand({ meta: { name: "litemcp", }, subCommands: { dev, inspect, }, }); runMain(main);
wong2/litemcp
185
A TypeScript framework for building MCP servers elegantly
TypeScript
wong2
wong2
src/cli/inspect.ts
TypeScript
import { defineCommand } from "citty"; import { execa } from "execa"; export default defineCommand({ meta: { name: "inspect", description: "Run server with MCP inspector", }, args: { script: { type: "positional", description: "The js script to run", valueHint: "server.js", req...
wong2/litemcp
185
A TypeScript framework for building MCP servers elegantly
TypeScript
wong2
wong2
src/index.ts
TypeScript
import { Server } from "@modelcontextprotocol/sdk/server/index.js"; import { startSSEServer, type SSEServer } from "mcp-proxy"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { CallToolRequestSchema, ErrorCode, GetPromptRequestSchema, ListPromptsRequestSchema, ListRes...
wong2/litemcp
185
A TypeScript framework for building MCP servers elegantly
TypeScript
wong2
wong2
src/logger.ts
TypeScript
import type { Jsonifiable, JsonValue } from "type-fest"; import type { Server } from "@modelcontextprotocol/sdk/server/index.js"; export class Logger { #server?: Server; private sendLoggingMessage(level: "debug" | "info" | "warning" | "error", data: Jsonifiable) { this.#server?.sendLoggingMessage({ leve...
wong2/litemcp
185
A TypeScript framework for building MCP servers elegantly
TypeScript
wong2
wong2
src/types.ts
TypeScript
import type { z } from "zod"; export type ToolParameters = z.ZodTypeAny; export interface Tool<Params extends ToolParameters = ToolParameters> { name: string; description?: string; parameters?: Params; execute: (args: z.infer<Params>) => Promise<any>; } export interface Resource { uri: string; name: stri...
wong2/litemcp
185
A TypeScript framework for building MCP servers elegantly
TypeScript
wong2
wong2
src/errors.ts
TypeScript
export class MoltbookError extends Error { readonly name = "MoltbookError"; readonly status: number; readonly statusText: string; readonly method: string; readonly url: string; readonly body: unknown; constructor(args: { message: string; status: number; statusText: string; method: string...
wong2/moltbook-ts
4
Moltbook TypeScript SDK
TypeScript
wong2
wong2
src/index.ts
TypeScript
export { Moltbook } from "./moltbook"; export { MoltbookError } from "./errors"; export type { MoltbookOptions } from "./moltbook"; export type { AddCommentRequest, AgentOwner, AgentProfile, AgentProfileResponse, AgentStatusResponse, ApiSuccess, ClaimStatus, Comment, CreateAnyPostRequest, CreateLi...
wong2/moltbook-ts
4
Moltbook TypeScript SDK
TypeScript
wong2
wong2
src/moltbook.ts
TypeScript
import { MoltbookError } from "./errors"; import type { AddCommentRequest, AgentProfileResponse, AgentStatusResponse, ApiSuccess, Comment, CreateLinkPostRequest, CreateAnyPostRequest, CreatePostRequest, CreateSubmoltRequest, GetCommentsParams, GetFeedParams, GetPostsParams, JsonObject, Post,...
wong2/moltbook-ts
4
Moltbook TypeScript SDK
TypeScript
wong2
wong2
src/types.ts
TypeScript
export type ISODateString = string; export type SortPosts = "hot" | "new" | "top" | "rising"; export type SortFeed = "hot" | "new" | "top"; export type SortComments = "top" | "new" | "controversial"; export type ClaimStatus = "pending_claim" | "claimed"; export type SearchType = "posts" | "comments" | "all"; export...
wong2/moltbook-ts
4
Moltbook TypeScript SDK
TypeScript
wong2
wong2
tsdown.config.ts
TypeScript
import { defineConfig } from "tsdown"; export default defineConfig({ entry: ["src/index.ts"], format: ["esm", "cjs"], outDir: "dist", sourcemap: true, dts: true, clean: true, exports: true, });
wong2/moltbook-ts
4
Moltbook TypeScript SDK
TypeScript
wong2
wong2
build.rs
Rust
use std::env; use std::process::Command; fn main() { let mut version = String::from(env!("CARGO_PKG_VERSION")); if let Some(commit_hash) = commit_hash() { version = format!("{version} ({commit_hash})"); } println!("cargo:rustc-env=KBS2_BUILD_VERSION={version}"); } // Cribbed from Alacritty: //...
woodruffw/kbs2
126
A secret manager backed by age
Rust
woodruffw
William Woodruff
astral-sh