Skip to content

Instantly share code, notes, and snippets.

View citadelgrad's full-sized avatar
🤖
Identified IT Risk

Scott Nixon citadelgrad

🤖
Identified IT Risk
View GitHub Profile
@citadelgrad
citadelgrad / AI_Vibe_Coding.md
Last active January 9, 2026 21:45
Getting started with AI Vibe Coding

So you wanna Vibe Code

2025 was by far my most productive year, and in the most time constrained period of my life. My assessment is that in the last 1.5 years, vibing a modest feature has gone from a highly frustrating experience with a dozen of iteration loops to a structured plan, delegate, and test loop. My general sense is that I'm 4-6 times more productive in 1.5 years.

Here's a high level framework that I use as a template for your journey into Vibe coding. This blog post describes that 8 levels of "Yegge's Developer-Agent Evolution Model."

TLDR

You want to try to start in the level 2 and level 3.

Stage 2: Coding agent in IDE, permissions turned on. A narrow coding agent in a sidebar asks your permission to run tools. Stage 3: Agent in IDE, YOLO mode: Trust goes up. You turn off permissions, agent gets wider.

Spark: Beautiful & Functional Applications Guide

Overview

You are a web coding playground generating runnable code micro-apps ("sparks"). This guide helps you produce experiences that are not only functional but aesthetically refined and emotionally resonant.

Doing tasks

The user will primarily request you perform software engineering tasks. This includes solving bugs, adding new functionality, refactoring code, explaining code, and more. The request from the user might be an initial request (initial generation), where you are working from a brand new state in a skeleton vite project. The request could also be a followup for an existing project with lots of content.

@citadelgrad
citadelgrad / cf.sh
Last active February 7, 2024 18:02
Manage cloudformation stacks
#!/bin/bash
# Set default region (you can modify this)
AWS_REGION="us-east-1"
# Error handling function
error_exit() {
echo "Error: $1" >&2
exit 1
}
export $(printf "AWS_ACCESS_KEY_ID=%s AWS_SECRET_ACCESS_KEY=%s AWS_SESSION_TOKEN=%s" \
$(aws sts assume-role \
--role-arn arn:aws:iam::123456789012:role/MyAssumedRole \
--role-session-name MySessionName \
--query "Credentials.[AccessKeyId,SecretAccessKey,SessionToken]" \
--output text))

Getting started with Python Development

Setting up your Dev Environment

  • Highly recommend using VSCode for developing.
  • Learn and always use virtual environments: venv
  • Highly recommend only developing on a Mac or Linux. If you are on Windows you can use Docker + VSCode to give you a Linux shell. This will reduce your likely hood of having problems install dependencies.
  • I really love using ptpython and ptipython because it helps with autocomplete. https://github.com/prompt-toolkit/ptpython
  • Real Python is definitely one of the best resources from learning Python. This is their Intro Learning Path https://realpython.com/learning-paths/python3-introduction/
@citadelgrad
citadelgrad / search_for_keys.py
Last active May 3, 2021 22:05
Find all occurrences of a key in nested dictionaries and lists
# Source: https://stackoverflow.com/questions/9807634/find-all-occurrences-of-a-key-in-nested-dictionaries-and-lists
# Python dict.iteritems became just dict.items.
# Easily coherse the generator into a list with: `list(gen_dict_extract("KeytoFind", MyDict))`
def gen_dict_extract(key, var):
if hasattr(var, 'items'):
for k, v in var.items():
if k == key:
yield v
if isinstance(v, dict):

Backup:

pg_dump -p 5432 database_name > database_name_data.sql

Restore backup dump into local db

psql -U username -d database_name -f objects.sql

pg_restore --verbose --clean --no-acl --no-owner -h localhost -d [db_name] db_backup.dump

React Native Guide

React Native Debugger Reactotron

Open React Native Debugger first and set the RN publishing Port to 19001. Then enabled Debug Remote JS in the Expo app.

Offline Storage Debugging

React Native Debugger

Name Patterns for JS & React

I'm able to visually identify and understand React components. However, I do not know the names used to identify them.

Class Component:

class MyList extends React.Component {...}

Function component:

function App() {return (...)}