Skip to content

Instantly share code, notes, and snippets.

View sanjeed5's full-sized avatar

Sanjeed sanjeed5

View GitHub Profile
@sanjeed5
sanjeed5 / notion_md_sync.py
Last active August 19, 2026 05:22
How to sync a Notion page from Markdown and upload local images (agent-safe Python script)
#!/usr/bin/env python3
"""How to sync a Notion page from local Markdown and attach images.
Replace a Notion page with a local Markdown file and upload relative images
as native Notion files. Built for agents that write the Markdown, then push
it to Notion without wiping comments or child pages.
Python 3.10+, stdlib only.
Usage:
@sanjeed5
sanjeed5 / agent-profiles.md
Last active June 25, 2026 12:57
Prompt: have your coding agent set up multiple isolated accounts/profiles (work, personal, client) for AI tools — Cursor Agent CLI, Claude Code, Cursor/VS Code GUI — via shell aliases

Multiple accounts/profiles for AI coding tools

Paste this into your coding agent. It adds shell aliases so you can run an AI tool under several isolated accounts (work / personal / client), each with its own login, settings, and history.

What to do

  1. Ask the user (use a multiple-choice/question tool if you have one): which tool(s), how many profiles + names, and preferred alias names. Suggest defaults.
@sanjeed5
sanjeed5 / telephony.diff
Created April 28, 2026 12:25
telephony.py diff for PR: curl User-Agent bypass + end-call flags
diff --git a/optional-skills/productivity/telephony/scripts/telephony.py b/optional-skills/productivity/telephony/scripts/telephony.py
index c9233647f..ab62abf33 100644
--- a/optional-skills/productivity/telephony/scripts/telephony.py
+++ b/optional-skills/productivity/telephony/scripts/telephony.py
@@ -234,6 +234,43 @@ def _parse_twilio_date(value: str | None) -> datetime | None:
return None
+def _vapi_request(
+ method: str,
@sanjeed5
sanjeed5 / amazon-hide-sponsored.user.js
Created January 27, 2026 14:11
Tampermonkey script to hide sponsored products on Amazon India search results
// ==UserScript==
// @name Amazon India - Hide Sponsored Products
// @namespace http://tampermonkey.net/
// @version 1.1
// @description Hides sponsored product listings on Amazon.in search results
// @author You
// @match https://www.amazon.in/s*
// @match https://www.amazon.in/s?*
// @grant GM_addStyle
// @run-at document-start

<frontend_aesthetics> You are responsible for creating distinctive, production-ready frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to visual detail and creative choices.

The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.

Design Direction

Before writing code, understand the context and commit to a BOLD aesthetic direction:

  • Purpose: What problem does this interface solve? Who is using it?
  • Tone: Choose an extreme direction: brutally minimal, maximalist chaos, retro-futuristic, organic and natural, luxury and refined, playful and toy-like, editorial and magazine, brutalist and raw, art deco and geometric, soft and pastel, industrial and utilitarian, etc. Use these as inspiration, but define a specific visual language that fits this interface.

TypeScript

  • Only create an abstraction if it’s actually needed
  • Prefer clear function/variable names over inline comments
  • Avoid helper functions when a simple inline expression would suffice
  • Use knip to remove unused code if making large changes
  • The gh CLI is installed, use it
  • Don't use emojis

React

@sanjeed5
sanjeed5 / gitlab-mr-creation.mdc
Created June 6, 2025 09:05
Gitlab MR Creation Cursor Rule (to develop branch)
# GitLab Merge Request Creation Guide
## Overview
This rule provides guidance for creating GitLab merge requests (MRs) with appropriate titles based on the changes made compared to the `develop` branch. All MRs should target the `develop` branch, not `main`.
## MR Creation Workflow
### 1. Analyze Changes
Before creating the MR, analyze what changed:
import argparse
import json
import os
import sys
def jsonl_to_json(jsonl_file_path: str, json_file_path: str):
"""
Converts a JSONL file to a JSON file.
Args:
@sanjeed5
sanjeed5 / langgraph_uv_guide.md
Created April 3, 2025 10:30
This is a concise guide on setting up and running the LangGraph development server (`langgraph dev`) using `uv` as the package manager and runner.

Running LangGraph Dev with UV

This is a concise guide on setting up and running the LangGraph development server (langgraph dev) using uv as the package manager and runner.

Prerequisites

  1. Python: Ensure you have Python 3.11+ installed.
  2. UV: Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh (or other methods from astral.sh/uv).
  3. .env file: Have your necessary API keys (e.g., OPENAI_API_KEY) in a .env file in your project root.
  4. LangGraph Agent: Have your LangGraph agent code (e.g., in agent.py) defining a compiled graph (e.g., graph).
{
"questions": [
{
"type": "guesstimate",
"role": "APM",
"difficulty": "medium",
"text": "Could you estimate the number of burgers a McDonald's outlet sells in a day?",
"context": "This is an average McDonald's outlet, not in a specific location like an airport. Only considering in-restaurant purchases.",
"referenceAnswer": "To estimate the number of burgers a McDonald's outlet sells in a day, I'll use a structured approach:\n\n1. Restaurant capacity: An average McDonald's has about 50 seats\n2. Operating hours: Typically open from 10 am to 10 pm (12 hours)\n3. Peak vs. non-peak consumption patterns:\n - Peak hours (12-2pm, 6-8pm): 80-90% occupancy\n - Regular hours: 30-40% occupancy\n4. Average meal time: 20-30 minutes\n5. Burger consumption: About 70% of customers order a burger\n\nCalculation:\n- Peak hours (4 hours): 50 seats × 0.85 occupancy × (4 hours × 60 min / 25 min per customer) × 0.7 burger rate ≈ 714 burgers\n- Regular hours (8 hours): 50 seats × 0.35