Skip to content

Instantly share code, notes, and snippets.

View dpaluy's full-sized avatar

David Paluy dpaluy

  • Majestic Labs
  • Austin, TX
  • X @dpaluy
View GitHub Profile
@dpaluy
dpaluy / application.rb
Created July 1, 2025 22:37
Merge rails secrets with ENV
module CredentialsDemo
class Application < Rails::Application
creds = credentials[Rails.env.to_sym]
.with_indifferent_access
.transform_keys(&:upcase)
.transform_values(&:to_s)
ENV.merge! creds.merge(ENV)
end
end

Global Development Principles

FUNDAMENTAL RULE: VERIFY EVERYTHING, ASSUME NOTHING

Before taking ANY action in ANY language or framework:

  • VERIFY the actual state of the codebase - read it, don't assume it
  • CHECK that files, functions, modules, and dependencies actually exist
  • READ the source code to understand actual implementations
  • CONFIRM exports, imports, and APIs match what you're trying to use
  • TEST your understanding with small verification steps

<Example: add this to your workflow>

SubTasks

  • Review the subtask. If anything is unclear, ask follow up questions
  • Upon subtask is completed, Run linter and tests and ensure they pass
  • Create a git commit
  • Declare "task is completed ✅"

Task Definition of Done (DoD)

@dpaluy
dpaluy / Prompt.md
Created June 11, 2025 04:09
Cursor Content Generator, aka Vibe Blogging

I've got a personal finance app called Maybe Finance and want to produce more personal finance articles. Here's where that is on our site: @https://maybefinance.com/articles First, do keyword research and come up with 10 keywords and article ideas based on that research.


Let's narrow that down to the 5 most impactful and realistic opportunties. Here's our sitemap of existing content so we don't duplicate anything. @https://maybefinance.com/sitemap.xml]

@dpaluy
dpaluy / poll-gh.md
Last active June 9, 2025 18:40
Poll Github Pull Request for checks

Poll CI Status: $ARGUMENTS

Use this command when you need to wait for all GitHub checks on a pull-request to complete and then branch into success or failure flows.

Parameters (space-separated)

Pos Name Example Purpose
1 pr_id 123 Pull-request number to monitor
2 interval 15 (optional, default 15 s) seconds between status polls
3 timeout 600 (optional, default 600 s) maximum wait in seconds
@dpaluy
dpaluy / codex-rails-pnpm.sh
Last active May 20, 2025 07:33
Setup Script for Rails application
#!/usr/bin/env bash
set -euo pipefail
################################################################################
# VARIABLES – adjust only if you really need something different
################################################################################
NODE_VERSION="22.12.0" # must match Dockerfile
PNPM_VERSION="latest" # use a specific version if you prefer
PARALLEL_JOBS="$(nproc)" # bundler / compile jobs
@dpaluy
dpaluy / Codex_instructions.md
Created May 19, 2025 01:26
Generate Prompts with GPT-3o for Codex

Instructions

  • The user will provide a task.
  • The task involves working with Git repositories in your current working directory.
  • Wait for all terminal commands to be completed (or terminate them) before finishing.

Git instructions

If completing the user's task requires writing or modifying files:

  • Do not create new branches.
  • Use git to commit your changes.
  • If pre-commit fails, fix issues and retry.
@dpaluy
dpaluy / agents.md
Created May 17, 2025 12:27
AGENTS.md SPEC for OpenAI Codex

AGENTS.md spec

  • Containers often contain AGENTS.md files. These files can appear anywhere in the container's filesystem. Typical locations include /, ~, and in various places inside of Git repos.
  • These files are a way for humans to give you (the agent) instructions or tips for working within the container.
  • Some examples might be: coding conventions, info about how code is organized, or instructions for how to run or test code.
  • AGENTS.md files may provide instructions about PR messages (messages attached to a GitHub Pull Request produced by the agent, describing the PR). These instructions should be respected.
  • Instructions in AGENTS.md files:
    • The scope of an AGENTS.md file is the entire directory tree rooted at the folder that contains it.
    • For every file you touch in the final patch, you must obey instructions in any AGENTS.md file whose scope includes that file.
  • Instructions about code style, structure, naming, etc. apply only to code within the AGENTS.md file's scope, unless the f
You are in "Planner Mode". Deeply reflect upon the changes being asked and analyze existing code to map the full scope of changes needed.
## Clarification Questions (If Necessary):
- If, *after this comprehensive, tool-based exploration*, critical details essential for planning are still missing, ask up to **three** concise, high-value questions. These questions must arise from gaps identified during your exploration.
Once answered, draft a comprehensive plan of action and ask me for approval on that plan. Once approved, summarize the final plan that can be implemented by a Code mode.
You are not allowed to EDIT any file. You can READ any file
@dpaluy
dpaluy / README.md
Last active March 18, 2025 03:42
Use gemini-2.0-flash-exp for image editing

gemini-2.0-flash-exp for iamge editing via API

Notes and Requirements

  1. API Key: Replace 'YOUR_API_KEY' with your actual Google AI API key. You can obtain this from the Google Cloud Console after enabling the Gemini API.

  2. Dependencies: Install the required libraries: pip install google-generativeai pillow requests

  • google-generativeai: The official Python library for the Google Gemini API.