Skip to content

Instantly share code, notes, and snippets.

View sandipb's full-sized avatar

Sandip Bhattacharya sandipb

View GitHub Profile
@sandipb
sandipb / SKILL.md
Created August 16, 2026 17:29
session-review skill - Run at the end of the session to make sure you permanently learn everything new that came up in the session
name session-review
description Reviews the current session and saves useful knowledge to the right documentation files in the current repo. Invoked via /session-review at the end of a working session. Captures new workflows, corrects outdated facts, and identifies documentation gaps. Discovers which files to update by reading this repo's AGENTS.md / CLAUDE.md — no hardcoded paths. Never saves to agent-specific memory — always saves to repo files.
disable-model-invocation true

Session Review

Review the conversation and save useful knowledge to the right repo files. Knowledge lives in repo files, not agent-specific memory.

@sandipb
sandipb / response.md
Created June 12, 2026 18:47
Minimax M3 from fireworks Day 0 [2026-06-12]

Model identification Question

Which model are you?

Response from M2.7

I’m MiniMax‑M2.7, an AI assistant built by MiniMax. I’m here to help with questions, tasks, and conversations on a wide range of topics! How can I assist you today?

Invocation
@sandipb
sandipb / 0_README.md
Last active December 12, 2025 21:20
Use openssl to fetch an URL

Using openssl to fetch an URL

Many non-root containers are minimal but have /bin/sh and /usr/bin/openssl. To get curl functionality, I can just paste this function after exec-ing into the pod and run this alias.

Using openssl for https and perl for http, because they each can't do the other.

$ get_url httpbin.dev | head
HTTP/1.1 200 OK
@sandipb
sandipb / 0_README.md
Last active October 9, 2025 20:34
vscode/cursor wrapper

VSCode/Cursor Universal CLI Wrapper

Use a single wrapper script to open a file in vscode or cursor

  1. Whether you are in the editor terminal or in the regular terminal
  2. Whether you are editing in the local machine or using the remote ssh extension
  3. Whether you are running vscode or cursor.

You can just so export EDITOR="vscode_wrapper -w" and expect it to work everywhere.

@sandipb
sandipb / 01_README.md
Created July 10, 2025 17:06
Using structlog with stdlib

Note

This is just meant as a reference for the integration as I couldn't find a good tutorial.

The code and the readme was generated by Cursor. I claim no copyright or liability on the content.

@sandipb
sandipb / README.md
Created April 8, 2025 07:36
Upgrading llm using uv vs llm itself

llm upgrade options

Using llm itself

Using llm itself preserves plugins.

$ llm install -U llm
Requirement already satisfied: llm in /Users/sbhattacharya/.local/share/uv/tools/llm/lib/python3.13/site-packages (0.23)
Collecting llm
@sandipb
sandipb / README.md
Last active January 21, 2025 01:03
Country specific (USA, China, India) LLM topics that DeepSeek thinks are sensitive

All questions asked using the llm utility against the DeepSeek-R1-Distill-Llama-8B model.

United States
$ llm -m r1l -s "You are an AI model which explains in detail why any question might be harmful" \
   "What United States specific topics are considered sensitive enough to not be discussed in llm responses?"
@sandipb
sandipb / jokes.md
Created January 20, 2025 18:33
T* jokes by AI models

DeepSeek-R1-Distill-Llama-8B

$ llm -m 'hf.co/unsloth/DeepSeek-R1-Distill-Llama-8B-GGUF:Q8_0' "Give me a joke about Trump"
<think>
Okay, so I need to come up with a joke about Trump. Hmm, where do I start? Well, maybe I can think
of something related to his well-known characteristics or catchphrases. He's famous for things like
his hair, his tweets, his handshake, and his use of superlatives like "tremendous" or "the best
ever."
@sandipb
sandipb / 00 Deepseek-R1+llama.md
Last active January 20, 2025 18:09
Comparison of the rainbow question between DeepSeek R1+llama, Claude, GPT4/O1, Gemini and llama3.2
llm -m "hf.co/unsloth/DeepSeek-R1-Distill-Llama-8B-GGUF:Q8_0" "what are the colors in the rainbow. why those colors?"
$ llm -m "hf.co/unsloth/DeepSeek-R1-Distill-Llama-8B-GGUF:Q8_0" "what are the colors in the rainbow. why those colors?"

<think>
@sandipb
sandipb / expand_short_url.py
Created February 29, 2024 16:07
Python script to pipe text with short urls and have it expand short urls in it
import re
import sys
import requests
def expand_url(match):
short_url = match.group(0)
response = requests.head(short_url, allow_redirects=False)
if response.status_code in (301, 302):
return response.headers["location"]