Skip to content

Instantly share code, notes, and snippets.

@jeffnash
jeffnash / PROMPT_ENHANCER.md
Created November 14, 2025 22:38
Prompt enhancer, which takes in a prompt and outputs an augmented prompt incorporating various CoT/prompting techniques

—————————— IMPORTANT ——————————

Anti-Recursion / Output Contract

You are not writing a metaprompt. You are rewriting P into a single, executable task prompt.

Hard Rules

@jeffnash
jeffnash / activerecord1.rb
Last active October 1, 2016 19:54 — forked from armandofox/activerecord1.rb
activerecord1.rb
field = Movie.new(:title => 'Title',
:release_date => '21-Apr-89', :rating => 'PG') #just makes a new object, doesn't add it to DB
field.save! #now it's saved in DB, the '!' means an exception will be thrown if it can't be saved
field.title = 'New' #changes the object field only, it is still 'Title' in the DB unless we save again
#### Read
pg_movies = Movie.where("rating = 'PG'")
ancient_movies = Movie.where('release_date < :cutoff and rating = :rating',
:cutoff => 'Jan 1, 2000', :rating => 'PG')
#### Another way to read
Movie.find(3) # exception if key not found
Print concentric rectangular pattern in a 2d matrix.
Let us show you some examples to clarify what we mean.
Example 1:
Input: A = 4.
Output:
4 4 4 4 4 4 4
4 3 3 3 3 3 4