Skip to content

Instantly share code, notes, and snippets.

View zackiles's full-sized avatar

Zachary Iles zackiles

View GitHub Profile
@zackiles
zackiles / run-cursor-dev-container-deno.ts
Created June 8, 2025 08:55
Runs a Cursor Dev Container (In Deno and Node)
#!/usr/bin/env deno run --allow-run --allow-read --allow-env
/**
* @module run-cursor-dev-container
* @fileoverview Generic Cursor Dev Container Launcher
*
* Automates the process of launching Cursor directly into any dev container,
* bypassing the need for manual "Reopen in Container" command palette actions.
*
* @description This script manages Docker container lifecycle and constructs the proper
@zackiles
zackiles / with-cursor-insight.md
Created April 29, 2025 08:30
Cursor Insight: Use Advanced Tools & Capabilities (A Cursor Rule File)
description globs alwaysApply

Cursor Insight: Use Advanced Tools & Capabilities

SUBTASK: Use this guide to help solve or answer the current query, user message, or task.

Overview

This rule provides a comprehensive guide to Cursor's advanced features, APIs, tools, and programmatic capabilities for solving complex problems. Use it to leverage Cursor's full potential when standard approaches are insufficient.

@zackiles
zackiles / capabilities.txt
Created March 10, 2025 00:04 — forked from jlia0/agent loop
Manus tools and prompts
# Manus AI Assistant Capabilities
## Overview
I am an AI assistant designed to help users with a wide range of tasks using various tools and capabilities. This document provides a more detailed overview of what I can do while respecting proprietary information boundaries.
## General Capabilities
### Information Processing
- Answering questions on diverse topics using available information
- Conducting research through web searches and data analysis
@zackiles
zackiles / X-deno.md
Created February 28, 2025 01:46 — forked from ruvnet/X-deno.md
This implementation follows the official MCP specification, including proper message framing, transport layer implementation, and complete protocol lifecycle management. It provides a foundation for building federated MCP systems that can scale across multiple servers while maintaining security and standardization requirements.

Deno Nodejs version

complete implementation using both Deno and Node.js. Let's start with the project structure:

federated-mcp/
├── packages/
│   ├── core/               # Shared core functionality
│   ├── server/            # MCP Server implementation
│   ├── client/            # MCP Client implementation
│   └── proxy/             # Federation proxy
@zackiles
zackiles / gpu-rental-financial-model-appscript.js
Created January 11, 2025 08:08
Appscript for Google Sheets that build a comprehensive and interactive financial model for a GPU rental business on a decentralized rental network
/*****************************************************
* Google Apps Script for a Comprehensive
* GPU Rental Business Financial Model in Google Sheets
*
* This script:
* 1. Creates/clears four sheets:
* - "Inputs"
* - "Calculations"
* - "Dashboard"
* - "Scenario Results"
const pw = require('playwright');
const UserAgent = require('user-agents');
const uuid = require('uuid');
const tmp = require('tmp-promise');
const UINT32_MAX = (2 ** 32) - 1;
const WEBGL_RENDERERS = ['ANGLE (NVIDIA Quadro 2000M Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (NVIDIA Quadro K420 Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (NVIDIA Quadro 2000M Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (NVIDIA Quadro K2000M Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (ATI Radeon HD 3800 Series Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (AMD Radeon R9 200 Series Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D
@zackiles
zackiles / prompt-context-javascript-styleguide.json
Last active November 3, 2024 06:55
Prompt-Context: Style guide for code generators writing modern Javascript & Typescript (JSON)
{
"StyleGuide": {
"Title": "JavaScript and TypeScript Coding Style Guide",
"Introduction": "This style guide outlines the best practices for writing modern, idiomatic, and maintainable JavaScript and TypeScript code, leveraging the latest ECMAScript features (ES2022 and above). It is designed to ensure code consistency, readability, and adherence to industry standards.",
"Sections": [
{
"Number": "1",
"Title": "Code Formatting",
"Rules": [
"Indentation: Use **2 spaces** for indentation.",
@zackiles
zackiles / prompt-context-javascript-styleguide.xml
Last active November 3, 2024 06:56
Prompt-Context: Style guide for code generators writing modern Javascript & Typescript (XML)
<StyleGuide>
<Title>JavaScript and TypeScript Coding Style Guide</Title>
<Introduction>
This style guide outlines the best practices for writing modern, idiomatic, and maintainable JavaScript and TypeScript code, leveraging the latest ECMAScript features (ES2022 and above). It is designed to ensure code consistency, readability, and adherence to industry standards.
</Introduction>
<Section number="1" title="Code Formatting">
<Rules>
<Rule>Indentation: Use **2 spaces** for indentation.</Rule>
<Rule>Semicolons: **Omit semicolons** unless absolutely necessary (e.g., to avoid ASI pitfalls).</Rule>
@zackiles
zackiles / patch-command.js
Created November 3, 2024 02:45
Virtualized Patch Command in Javascript
import fs from 'node:fs/promises';
import path from 'node:path';
/**
* Applies a unified diff to a file system, emulating the Unix 'patch' command.
* @param {string} jsonString - The JSON string containing 'target_file' and 'diff'.
* @param {Object} [fsModule] - Optional file system module (e.g., memfs) for virtual file systems.
*/
async function applyPatch(jsonString, fsModule = fs) {
try {
@zackiles
zackiles / gnu-unified-diff-prompt.xml
Created November 3, 2024 02:43
Token-Efficient and Consistent AI Code Generation Through GNU Unified Diff (XML)
<output>
<OUTPUT_FORMAT>
<type>JSON</type>
<encoding>UTF-8</encoding>
<structure>
<target_file>string (relative path with forward slashes)</target_file>
<diff>string (unified diff with \n line breaks)</diff>
<error>string (optional, only present for errors)</error>
</structure>
</OUTPUT_FORMAT>