Skip to content

Instantly share code, notes, and snippets.

@townie
townie / codex
Created January 13, 2026 03:00
/implement command
---
name: codex
description: Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing.
---
# Codex Skill Guide
Use this skill to run Codex CLI for consultation, reviews, or automated tasks.
## Running a Task
const rulesSections = [
{
id: "league-structure",
title: "League Structure",
icon: Users,
items: [
"League Size: 12 teams (expanded from previous seasons)",
"Platform: ESPN Fantasy Football",
"Season: 2024/2025",
import os
import sys
import warnings
from logging.config import fileConfig
from alembic import context
from sqlalchemy import engine_from_config, pool
# Suppress SQLAlchemy circular dependency warnings
warnings.filterwarnings(
"""
Base SQLModel configuration for the application.
"""
from sqlmodel import SQLModel
# This is the base class that all models will inherit from
# SQLModel automatically creates the metadata that Alembic needs
Base = SQLModel
def ordinal_to_roman(ordinal):
"""
Converts a chapter ordinal (number, word, or Roman numeral) to a Roman numeral.
Args:
ordinal: The chapter ordinal, which can be an integer, a word
representation of a number (e.g., "one", "two"), or a
Roman numeral string.
graph TD
    subgraph "Client Applications"
        FE[Frontend]
        External[External Clients]
    end

    subgraph "API Layer"
        API[Public API]
        AdminAPI[Admin API]
import time
def timeit(method):
def timed(*args, **kw):
ts = time.time()
result = method(*args, **kw)
te = time.time()
if 'log_time' in kw:
name = kw.get('log_name', method.__name__.upper())
kw['log_time'][name] = int((te - ts) * 1000)
GameInstance (an object spawned when you launch the application and that remains the same until you close it)
GameMode (spawned when a level is loaded)
GameState (spawned by the gameMode)
PlayerState (spawned when a PlayerController is spawned = when a player arrives in the game)
You have to pay close attention to what you do and where you do it
when coding a multiplayer game. When it comes to singleplayer, you can’t
really “have it wrong” except for GameInstance stuff.
But here are the general guidelines I follow:
GameInstance - Holds any non-pointer persistent
variables (persistent means that you need to store in between two levels
def some_function(value):
value = value or "Potato"
@townie
townie / ipdb.snippet
Created May 9, 2019 17:47
sublimetext ipdb.snippet
<snippet>
<content><![CDATA[
import ipdb;ipdb.set_trace()
]]></content>
<!-- ipdb breakpoint snippet -->
<scope>source.python</scope>
<tabTrigger>ipdb</tabTrigger>
</snippet>