Skip to content

Instantly share code, notes, and snippets.

@sam-paech
sam-paech / gist:2a269e47d1c47e3c0103e2edf5d74e39
Last active September 13, 2025 23:07
squash the em-dash
#!/usr/bin/env python3
"""
Demonstrate banning the em-dash (and common variants) with logit_bias.
import os, sys, textwrap
import openai # pip install openai>=1.9.0
MODEL = "chatgpt-4o-latest"
PROMPT = ("Write a short sentence that would normally include an em dash "
"(for example between two clauses).")
@sidpan1
sidpan1 / README.md
Created April 8, 2025 07:23
Claude Desktop MCP Server Installer

Claude MCP Setup Script

This script automatically installs and configures MCP (Model Context Protocol) servers for Claude Desktop on macOS. It allows you to enhance Claude with various capabilities like web search, file access, Python execution, and more.

Installation

Run this one-liner in your Terminal:

curl -fsSL https://gist.githubusercontent.com/GITHUB_USERNAME/GIST_ID/raw/claude-mcp-setup.sh | bash
@feveromo
feveromo / Claude MCP Windows.md
Last active September 16, 2025 14:17
MCP-Windows

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
@deepfates
deepfates / convert_archive.py
Created November 17, 2024 19:33
Convert your twitter archive into a training dataset and markdown files
import argparse
import json
import logging
import os
import re
import shutil
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass
from datetime import datetime
from typing import Any, Callable, Dict, List, Literal, Optional, Tuple
@dupontgu
dupontgu / landscape_to_blurred_portrait.sh
Created September 30, 2024 21:45
Shell script to embed a landscape video inside a blurred, portrait version of itself.
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: $0 <input_video>"
exit 1
fi
input_file="$1"
if [ -z "$2" ]; then
@stong
stong / cups-browsed.md
Last active January 15, 2025 14:08
CUPS disclosure leaked online. Not my report. The original author is @evilsocket

Original report

  • Affected Vendor: OpenPrinting
  • Affected Product: Several components of the CUPS printing system: cups-browsed, libppd, libcupsfilters and cups-filters.
  • Affected Version: All versions <= 2.0.1 (latest release) and master.
  • Significant ICS/OT impact? no
  • Reporter: Simone Margaritelli [[email protected]]
  • Vendor contacted? yes The vendor has been notified trough Github Advisories and all bugs have been confirmed:
@duyixian1234
duyixian1234 / agent.py
Last active July 11, 2025 07:53
Ai Agent
import json
from collections.abc import Callable
import sys
from typing import Annotated
from function_schema import get_function_schema
from openai import OpenAI
from openai.types.chat import ChatCompletionMessageParam
@rahaaatul
rahaaatul / zsh_on_termux.md
Last active September 2, 2025 20:10
Installing ZSH on Termux including themes & useful plugins

ZSH on Termux!

Spice up termux with beautiful themes and productivity plugins to make your life easier!

Install ZSH, GIT & LSD

pkg install zsh git lsd vim

Install Oh-My-Zsh

@smx-smx
smx-smx / XZ Backdoor Analysis
Last active June 2, 2025 22:53
[WIP] XZ Backdoor Analysis and symbol mapping
XZ Backdoor symbol deobfuscation. Updated as i make progress
@thesamesam
thesamesam / xz-backdoor.md
Last active September 11, 2025 08:38
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background