Skip to content

Instantly share code, notes, and snippets.

@formatBCE
formatBCE / sendspin-player-1.yaml
Last active March 12, 2026 19:26
Sendspin example for ESP32S3 with 2 or 8 MB of PSRAM and DAC (like MAX98357 or UDA1334)
esphome:
name: sendspin-player-1
friendly_name: sendspin-player-1
min_version: 2026.2.0
esp32:
board: esp32-s3-devkitc-1
cpu_frequency: 240MHz
variant: esp32s3
flash_size: 16MB
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@evancz
evancz / Guidelines.md
Last active March 12, 2026 19:26
Some thoughts on how to have nicer discussions online

Towards Discussion Guidelines

I personally like to have discussions in the spirit of the Socratic method. Instead of declaring my opinion, I ask a relevant question. How about this situation? What about this case? This has two possible outcomes.

  1. The other person explains to me how things work in that case. I realize that I misunderstood, and we both come out enriched and in agreement.
  2. The other person realizes that those situations are not covered. They realize they misunderstood, and we both come out enriched and in agreement.

In both cases, it could have been a conflict, egos crashing together. But by asking questions, it becomes a collaboration to find the best answer. Even the simple act of asking a question in the first place says, "I care what you have to say, we can agree on this." That said, I have noticed that it is definitely still possible for things to go wrong within this framework. How can this happen?

There was a passage from [The

@ingramali
ingramali / sqlmap-cheat-sheet.md
Created October 11, 2019 10:08 — forked from jkullick/sqlmap-cheat-sheet.md
SQLMap Cheat Sheet
# Enumerate databases
sqlmap --dbms=mysql -u "$URL" --dbs

# Enumerate tables
sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" --tables

# Dump table data
sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" -T "$TABLE" --dump
@theramjad
theramjad / gist:8ae314578769ff2fb38cdd7bd283b2e9
Created March 11, 2026 22:59
Ray Amjad's Claude Code Statusline
#!/bin/bash
# Read JSON input from stdin
input=$(cat)
# Extract model display name
model=$(echo "$input" | jq -r '.model.display_name // "Claude"')
# Extract context window data
used=$(echo "$input" | jq -r '.context_window.used_percentage // empty')
/*
* Copyright 2026 Kyriakos Georgiopoulos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE
*
* Unless required by applicable law or agreed to in writing, software
@lelegard
lelegard / win-home-gpedit.md
Last active March 12, 2026 19:21
Enabling the Group Policy Editor on Windows 10 Home

Enabling the Group Policy Editor on Windows 10 Home

On Windows 10 Home edition, there is no Local Group Policy Editor (gpedit.msc) and no Local Security Policy Editor (secpol.msc). These tools are reserved to Professional editions of Windows.

It is however possible to install them on Windows 10 Home if you need them.

Open a PowerShell window as administrator and run the following command:

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active March 12, 2026 19:20
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under the Quests tab
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter:

State Space Model

This is a mathematic representation of a dynamic system as a linear equation. Although there is no perfectly linear system in the real world, they work well enough as approximations and make calculations much, much easier

$$ \bar{x} = (\text{position, velocity, ...}) $$

$$ \bar{u} = (\text{motor voltage})