Skip to content

Instantly share code, notes, and snippets.

@tkafka
tkafka / README.md
Last active October 16, 2025 05:40
Detect Electron apps on mac where the Electron hasn't yet been updated to fix the system wide lag
@marksweb
marksweb / conftest.py
Created August 2, 2025 10:01
Models as pytest fixtures
from django.apps import apps
def create_model_fixture(model):
"""
This injects the model names as fixtures.
eg def test_something(MyModel):
will make the `MyModel` available in a test.
"""
@judy2k
judy2k / brew_installed.sh
Created July 23, 2025 10:25
List installed homebrew packages.
#!/bin/sh
# This script prints out the packages that have been installed by homebrew,
# along with a description of each package.
#
# This doesn't include packages that were installed as dependencies,
# only packages requested explicitly by the user.
#
# This script requires the following packages: jq, qsv
@andreagrandi
andreagrandi / settings.json
Created July 12, 2025 14:14
Claude Code notifications hooks
...
"hooks": {
"Notification": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "terminal-notifier -title \"🔔 Claude Code\" -message \"Claude needs your input\""
}
@RafalWilinski
RafalWilinski / claude-desktop-auto-allow-everything-mcp.js
Last active June 20, 2025 20:00
Auto-approve all MCP tool calls in Claude Desktop
// HOW TO INSTRUCTIONS
// 1. Open Claude Desktop
// 2. Go to Help -> Enable Developer Mode
// 3. Navigate Developer Tools window named "Developer Tools - https://claude.ai"
// 4. Go to "Console" tab
// 5. Type "allow pasting" and hit Enter
// 6. Paste this snippet and hit Enter
// From now on, all MCP calls will be auto-approved
@transitive-bullshit
transitive-bullshit / claude-code-prompts.js
Last active October 9, 2025 22:47
Unminified prompts and tool definitions for Claude Code
// Claude Code is a Beta product per Anthropic's Commercial Terms of Service.
// By using Claude Code, you agree that all code acceptance or rejection decisions you make,
// and the associated conversations in context, constitute Feedback under Anthropic's Commercial Terms,
// and may be used to improve Anthropic's products, including training models.
// You are responsible for reviewing any code suggestions before use.
// (c) Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service (https://www.anthropic.com/legal/commercial-terms).
// Version: 0.2.9
@vgel
vgel / r1.py
Last active August 14, 2025 13:13
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(
@awni
awni / mlx_distributed_deepseek.md
Last active October 6, 2025 13:50
Run DeepSeek R1 or V3 with MLX Distributed

Setup

On every machine in the cluster install openmpi and mlx-lm:

conda install conda-forge::openmpi
pip install -U mlx-lm

Next download the pipeline parallel run script. Download it to the same path on every machine:

@bmispelon
bmispelon / Django_SC_December2024.csv
Created December 11, 2024 11:14
Django Steering Council candidate statements December 2024
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
Name,Pronouns,Location,Statement
Andrew Miller,(he/him),"Cambridge, UK","Hi there, for those that haven’t come across me yet, I’m very active on the Discord, joining a couple of years ago, I serve as a moderator and generally helping out. I have also authored a Working Group proposal that is almost ready to go live, pending Board approval. Finally I organise the monthly Django Social in Cambridge.
However perhaps what is most relevant to my nomination for the Steering Council are the blog posts I have written this year. They have been short & snappy where I have prodded and explained different aspects of using Django, the contributing process and other aspects of the community.
I am nominating myself for the Steering Council to ensure that Django has a secure future. Personally I have used Django for the last 12 years and it has been integral to my software engineering career. The last two and half years have been the best in terms of getting involved in the community and has increased my passion for improv
@thibaudcolas
thibaudcolas / dsf-elections-turnout.md
Last active December 18, 2024 20:07
Django Software Foundation elections voter turnout

Over recent elections the data is readily available for

Elections Total voters Votes over first 7 days Total votes % 7 days % total
6.x Steering Council 400 215 215 20% 54%
2025 DSF Board 374 76 204 20% 55%
2024 DSF Board 287 93 132 32% 46%
5.x Steering Council 268 74 74 28% 28%
2023 DSF Board 244 58 91 24% 37%