Skip to content

Instantly share code, notes, and snippets.

You are ChatGPT, a large language model based on the GPT-5 model and trained by OpenAI.
Knowledge cutoff: 2024-06
Current date: 2025-08-08
Image input capabilities: Enabled
Personality: v2
Do not reproduce song lyrics or any other copyrighted material, even if asked.
You're an insightful, encouraging assistant who combines meticulous clarity with genuine enthusiasm and gentle humor.
Supportive thoroughness: Patiently explain complex topics clearly and comprehensively.
Lighthearted interactions: Maintain friendly tone with subtle humor and warmth.
@tspng
tspng / spec.md
Created August 1, 2025 14:30 — forked from CypherpunkSamurai/spec.md
Kiro AI System Prompt

System Prompt

Identity

You are Kiro, an AI assistant and IDE built to assist developers.

When users ask about Kiro, respond with information about yourself in first person.

You are managed by an autonomous process which takes your output, performs the actions you requested, and is supervised by a human user.

You talk like a human, not like a bot. You reflect the user's input style in your responses.

@tspng
tspng / ai_git_commit.sh
Last active March 12, 2025 09:15 — forked from karpathy/add_to_zshrc.sh
Git Commit Message AI
# -----------------------------------------------------------------------------
# AI-powered Git Commit Function
# Based on Andrej Karpathy's code:
# https://gist.github.com/karpathy/1dd0294ef9567971c1e4348a90d69285
#
# This function:
# 1) gets the current staged changed diff
# 2) sends them to an LLM to write the git commit message
# 3) allows you to easily accept, edit, re-write, regenerate, cancel
# Uses `llm` CLI tool to communicate with llm APIs (https://llm.datasette.io/)
@tspng
tspng / direnvrc
Created September 12, 2024 09:53
direnv layout for uv virtualenvs
layout_python_uv() {
if [[ -n "${UV_PYTHON:-}" && $# -gt 0 ]]; then
log_error "Both UV_PYTHON and a Python version argument are provided."
log_error "Please use only one method to specify the Python version."
return 1
fi
UV_PROJECT_ENVIRONMENT="${UV_PROJECT_ENVIRONMENT:-$(pwd)/.venv}"
UV_PYTHON="${1:-${UV_PYTHON:-python3}}"
@tspng
tspng / .iterm-colours.zsh
Created January 31, 2024 08:44 — forked from aclarknexient/.iterm-colours.zsh
Set iTerm2 tab colours based on the command you are running
# A dotfile to turn iTerm2 tabs a different colour based on the command glob.
# Useful for marking different environments in different colours.
# Cargo-culted from multiple sources, apologies for not fully acknowledging them :(
# Edit the line that reads "if [[ "$1" =~ "^(login-helper) " ]]; then" and replace
# "login-helper" with whatever command you use to authenticate. Then modify the case
# statement to match your auth command's arguments. For example: you may use a script
# called "authsaml" to authenticate, and its arguments are dev, test, preprd, and prd.
# Change the colour function you call if you want to change tab colours.
@tspng
tspng / bookmarklet.js
Created January 14, 2024 14:10
Map Genie | Baldur's Gate 3 Map | My Categories - https://mapgenie.io/baldurs-gate-3/maps/baldurs-gate
javascript:(function() { const MY_CATEGORIES = ['AREA', 'WAYPOINT', 'UNIQUE ARMOR', 'UNIQUE WEAPON', 'SIDE QUEST']; document.querySelectorAll('#categories .category-item').forEach(e => { e.classList.contains('category-visible') && e.click(); MY_CATEGORIES.includes(e.querySelector('span[class=\"title\"]').innerText) && e.click(); }); })();
@tspng
tspng / End G-Code
Created December 21, 2023 22:08
Creality Ender-3 S1 Pro - Cura Slicer Settings
G91 ;Relative positioning
G1 E-2 F2700 ;Retract a bit
G1 E-2 Z0.2 F2400 ;Retract and raise Z
G1 X5 Y5 F3000 ;Wipe out
G1 Z10 ;Raise Z more
G90 ;Absolute positioning
G1 X0 Y{machine_depth} ;Present print
M106 S0 ;Turn-off fan
M104 S0 ;Turn-off hotend
@tspng
tspng / iTermColorsToTerminalColors.swift
Created November 26, 2023 09:17
Convert iTerm2 color scheme to Terminal.app color scheme (Swift 5 Compatible)
#!/usr/bin/xcrun swift
//
// Copyright © 2016 Leon Breedt
// Ported to Swift 5 by Pablo Morelli 2019
//
// 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-2.0
@tspng
tspng / .gitconfig
Created March 3, 2022 16:03
My .gitconfig
# This is Git's per-user configuration file.
[push]
default = simple
[user]
name = tspng
email = tspng@socket.ch
[core]
excludesfile = /Users/tspng/.gitignore_global
[http]
# allow large deltas to be pushed
@tspng
tspng / testcase.py
Created July 27, 2021 10:40
SQLAlchemy Many-to-One delete with backref testcase
import unittest
from sqlalchemy import Column, Integer, ForeignKey, create_engine, event
from sqlalchemy.orm import backref, relationship, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.exc import IntegrityError
from sqlalchemy.engine import Engine
Base = declarative_base()
engine = create_engine('sqlite://')