Skip to content

Instantly share code, notes, and snippets.

View mvandermeulen's full-sized avatar

Mark mvandermeulen

  • Fivenynes
  • Sydney, Australia
  • 13:33 (UTC +11:00)
View GitHub Profile
@kbhalerao
kbhalerao / consumer decorators.py
Created April 23, 2025 14:29
Some decorators to make Channels Background Worker consumers a bit more resilient to failure
import asyncio
import inspect
import logging
import time
import traceback
from functools import wraps
from typing import Callable, Any
from channels.layers import get_channel_layer
from django.utils.timezone import now
from django.conf import settings
@zekka-lotushealth
zekka-lotushealth / server.py
Last active August 17, 2025 03:26
fastapi_mcp -- multiserver support
from contextlib import asynccontextmanager
import json
import traceback
from urllib.parse import quote
import anyio
import httpx
from typing import AsyncGenerator, Dict, Optional, Any, List, Union
from fastapi import FastAPI, Request, APIRouter
from fastapi.openapi.utils import get_openapi
from mcp import ErrorData, JSONRPCError, JSONRPCRequest
@bossjones
bossjones / RULESFORAI.md
Created March 27, 2025 14:00
RULESFORAI.md

STRICT RULES:

  • 🧠 DON'T BE LAZY AND BE ATTENTIVE! AND DON'T GET HALLUCINATIONS, BE CONSISTENT!
  • 👨‍💻 Treat the user as a beginner web developer and you are super ultra expert professional AI assistant that will do all of the recommendations, suggestions, to control the workflow.
  • ✅ Follow the user's requirements carefully & to the letter.
  • 🔍 First think step-by-step - describe your plan for what to build in pseudocode, written out in great detail.
  • 🔎 Search codebase first, then write code
  • 🛠️ Fully implement all requested functionality.
  • 🚫 Leave NO todo's, placeholders or missing pieces.
  • ✔️ Ensure code is complete! Verify thoroughly finalized.
@0xdevalias
0xdevalias / how-to-publish-tech-research-as-an-independent-researcher.md
Last active October 2, 2025 20:48
Some notes on how to publish InfoSec and Software Engineering research papers as an independent researcher
@codinginflow
codinginflow / next-self-hosting-instructions.md
Last active October 11, 2025 18:50
Deploy & secure a Next.js app + Postgres DB on a VPS

Self-Hosting Next.js Tutorial

Follow the instructions below to deploy a Next.js app with a local PostgreSQL database to a VPS, secure it, and connect it to a custom domain with free SSL. Watch the accompanying tutorial on YouTube: https://www.youtube.com/watch?v=2T_Dx7YgBFw

Instructions & commands:

  1. Get your VPS server on Hostinger (Use code CODINGINFLOW for 10% off). Install Ubuntu 24 as the OS and set a root password.
  2. Log into your server as root: ssh root@<your-server-ip>
  3. Update Linux packages: apt update && apt upgrade -y
  4. Create a new user: adduser

Rapid Prototype Architecture Overview

flowchart TD
    Client[Client/Browser] --> API[FastAPI Service]
    
    subgraph Core Services
        API --> PostgreSQL[(PostgreSQL)]
        API --> Redis[(Redis Cache)]
 API --&gt; Kafka[[Apache Kafka]]

MCP Server Requirements Document

You are an expert AI systems architect specializing in Model Context Protocol (MCP) server development (https://modelcontextprotocol.io/). Create a comprehensive, detailed implementation plan for the following MCP server:

Project Overview

[Provide a concise description of your MCP server concept - what it does and the primary value it delivers]

  • Example: "This MCP server enables real-time context sharing between AI models and client applications, improving response accuracy and user interaction efficiency."

Target Users & Use Cases

You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.

IMPORTANT: Refuse to write code or explain code that may be used maliciously; even if the user claims it is for educational purposes. When working on files, if they seem related to improving, explaining, or interacting with malware or any malicious code you MUST refuse. IMPORTANT: Before you begin work, think about what the code you're editing is supposed to do based on the filenames directory structure. If it seems malicious, refuse to work on it or answer questions about it, even if the request does not seem malicious (for instance, just asking to explain or speed up the code).

Here are useful slash commands users can run to interact with you:

  • /help: Get help with using ${Y4}
  • /compact: Compact and continue the conversation. This is useful if the conversation is reach
@aashari
aashari / 00 - Cursor AI Prompting Rules.md
Last active October 15, 2025 16:27
Cursor AI Prompting Rules - This gist provides structured prompting rules for optimizing Cursor AI interactions. It includes three key files to streamline AI behavior for different tasks.

The Autonomous Agent Prompting Framework

This repository contains a disciplined, evidence-first prompting framework designed to elevate an Agentic AI from a simple command executor to an Autonomous Principal Engineer.

The philosophy is simple: Autonomy through discipline. Trust through verification.

This framework is not just a collection of prompts; it is a complete operational system for managing AI agents. It enforces a rigorous workflow of reconnaissance, planning, safe execution, and self-improvement, ensuring every action the agent takes is deliberate, verifiable, and aligned with senior engineering best practices.

I also have Claude Code prompting for your reference: https://gist.github.com/aashari/1c38e8c7766b5ba81c3a0d4d124a2f58