Skip to content

Instantly share code, notes, and snippets.

View morisono's full-sized avatar

morisono

View GitHub Profile
@ruvnet
ruvnet / VS-MCP.md
Created April 4, 2025 22:19
This comprehensive guide outlines how to create a Model Context Protocol (MCP) server for VSCode that enables multiple workspaces or codespaces to collaborate seamlessly through STDIO communication. The implementation supports shared terminals, extension state synchronization, and collaborative editing.

Building a VSCode Remote Access MCP Server for Collaborative Agentic Development

Before diving into the implementation, let's understand what makes this solution valuable: it creates a bridge between isolated development environments, enabling real-time collaboration without the limitations of traditional remote development approaches.

MCP Server Architecture

The MCP (Model Context Protocol) server architecture consists of several key components that work together to facilitate communication between multiple VSCode instances:

  1. A centralized MCP server that handles message routing and state synchronization
  2. Client connections from multiple workspaces or codespaces
@ruvnet
ruvnet / .roomodes.json
Last active April 20, 2025 03:08
This guide introduces Roo Code and the innovative Boomerang task concept, now integrated into SPARC Orchestration. By following the SPARC methodology (Specification, Pseudocode, Architecture, Refinement, Completion) and leveraging advanced reasoning models such as o3, Sonnet 3.7 Thinking, and DeepSeek, you can efficiently break down complex proj…
{
"customModes": [
{
"slug": "sparc",
"name": "⚡️ SPARC Orchestrator",
"roleDefinition": "You are SPARC, the orchestrator of complex workflows. You break down large objectives into delegated subtasks aligned to the SPARC methodology. You ensure secure, modular, testable, and maintainable delivery using the appropriate specialist modes.",
"customInstructions": "Follow SPARC:\n\n1. Specification: Clarify objectives and scope. Never allow hard-coded env vars.\n2. Pseudocode: Request high-level logic with TDD anchors.\n3. Architecture: Ensure extensible system diagrams and service boundaries.\n4. Refinement: Use TDD, debugging, security, and optimization flows.\n5. Completion: Integrate, document, and monitor for continuous improvement.\n\nUse `new_task` to assign:\n- spec-pseudocode\n- architect\n- code\n- tdd\n- debug\n- security-review\n- docs-writer\n- integration\n- post-deployment-monitoring-mode\n- refinement-optimization-mode\n\nValidate:\n✅ Files < 500 lines\n✅ No hard-coded
@vgel
vgel / r1.py
Last active March 29, 2025 15:50
script to run deepseek-r1 with a min-thinking-tokens parameter, replacing </think> with a random continuation string to extend the model's chain of thought
import argparse
import random
import sys
from transformers import AutoModelForCausalLM, AutoTokenizer, DynamicCache
import torch
parser = argparse.ArgumentParser()
parser.add_argument("question", type=str)
parser.add_argument(
@yamanahlawat
yamanahlawat / upgrade_shadcn_components.sh
Created January 19, 2025 17:59
Script to bulk update all shadcn/ui components in a Next.js project
#!/bin/bash
# update-shadcn-components.sh
# Script to bulk update all shadcn/ui components in a Next.js project
# Usage: ./update-shadcn-components.sh
# Set error handling
set -e
# Check if we're in a Next.js project
@Kinyugo
Kinyugo / install_cursor.sh
Last active April 18, 2025 06:20
Cursor AI IDE Installer and Updater Script
#!/bin/bash
installCursor() {
local CURSOR_URL="https://downloader.cursor.sh/linux/appImage/x64"
local ICON_URL="https://miro.medium.com/v2/resize:fit:700/1*YLg8VpqXaTyRHJoStnMuog.png"
local APPIMAGE_PATH="/opt/cursor.appimage"
local ICON_PATH="/opt/cursor.png"
local DESKTOP_ENTRY_PATH="/usr/share/applications/cursor.desktop"
echo "Checking for existing Cursor installation..."
@yamanahlawat
yamanahlawat / upgrade_pyproject.py
Created December 5, 2024 12:58
Upgrade all packages using uv
"""
Script to update pyproject.toml dependencies based on uv.lock file.
Prerequisites:
1. Python 3.11+ (for tomllib)
2. tomli-w package (`pip install tomli-w`)
3. Updated uv.lock file (`uv lock --update` or `uv lock -U`)
Usage:
1. Update your lockfile: `uv lock -U`
@yhoiseth
yhoiseth / upgrade.py
Last active March 22, 2025 15:57
Upgrade all dependencies to their latest version using uv
#!/usr/bin/env python
# https://gist.github.com/yhoiseth/c80c1e44a7036307e424fce616eed25e
from typing import Any
from re import match, Match
import toml
import subprocess
def main() -> None:
with open("pyproject.toml", "r") as file:

Model Context Protocol (MCP) Servers Quick Reference

Filesystem Server

Provides filesystem operations within allowed directories.

Tool Description Required Parameters
read_file Read complete file contents path (string)
read_multiple_files Read multiple files at once paths (string[])
write_file Create/overwrite file path (string), content (string)

Setting Up MCP Servers on Windows

A step-by-step guide to setting up Model Context Protocol (MCP) servers for Claude Desktop on Windows.

Prerequisites

  1. Install Node.js (v18.x or later)
    • Download from: https://nodejs.org/
    • Verify installation by opening Command Prompt (CMD) and running:
      node --version
      npm --version
@joeblackwaslike
joeblackwaslike / How-to-Python-in-Cursor.md
Last active April 13, 2025 08:44
How to use python with the Cursor IDE

How to use python with the Cursor AI IDE

We are going to edit cursors settings to point to the microsoft extensions marketplace.

  1. Remove all extensions and exit Cursor.
  2. Locate your Cursor project.json file depending on your platform and open it.
    • On MacOS: /Applications/Cursor.app/Contents/Resources/app/product.json
    • On Windows: C:\Users\<user_name>\AppData\Local\Programs\cursor\resources\app\product.json
    • On Linux: /usr/lib/code/product.json
  3. Locate the object value for key extensionsGallery in the json document.