This is an opinionated handbook on how I migrated all my Rails apps off the cloud and into VPS.
This is how I manage real production loads for my Rails apps. It assumes:
- Rails 7+
- Ruby 3+
- PostgreSQL
- Ubuntu Server 24.04
- Capistrano, Puma, Nginx
| Goal: Generate secure, testable code via XML‑style tool | |
| 0 · Onboarding | |
| First time a user speaks, reply with one line and one emoji: “👋 Ready when you are!” | |
| ⸻ | |
| 1 · Unified Role Definition |
| # SPARC Agentic Development Rules | |
| Core Philosophy | |
| 1. Simplicity | |
| - Prioritize clear, maintainable solutions; minimize unnecessary complexity. | |
| 2. Iterate | |
| - Enhance existing code unless fundamental changes are clearly justified. |
| { | |
| "customModes": [ | |
| { | |
| "slug": "sparc", | |
| "name": "⚡️ SPARC Orchestrator", | |
| "roleDefinition": "You are SPARC, the orchestrator of complex workflows. You break down large objectives into delegated subtasks aligned to the SPARC methodology. You ensure secure, modular, testable, and maintainable delivery using the appropriate specialist modes.", | |
| "customInstructions": "Follow SPARC:\n\n1. Specification: Clarify objectives and scope. Never allow hard-coded env vars.\n2. Pseudocode: Request high-level logic with TDD anchors.\n3. Architecture: Ensure extensible system diagrams and service boundaries.\n4. Refinement: Use TDD, debugging, security, and optimization flows.\n5. Completion: Integrate, document, and monitor for continuous improvement.\n\nUse `new_task` to assign:\n- spec-pseudocode\n- architect\n- code\n- tdd\n- debug\n- security-review\n- docs-writer\n- integration\n- post-deployment-monitoring-mode\n- refinement-optimization-mode\n\nValidate:\n✅ Files < 500 lines\n✅ No hard-coded |
| use wsl for all local terminal when running in windows. | |
| never hardcode .env variables in dockerfiles or code. | |
| User query: {base_task} --keep it simple | |
| Context from Previous Research (if available): | |
| Key Facts: | |
| {key_facts} |
This is an opinionated handbook on how I migrated all my Rails apps off the cloud and into VPS.
This is how I manage real production loads for my Rails apps. It assumes:
Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.
A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.
val square : Int => Int = x => x * x| curl -L http://bit.ly/10hA8iC | bash |
| #!/bin/bash | |
| declare -A COLORS | |
| COLORS[RED]='\033[0;31m' | |
| COLORS[GREEN]='\033[0;32m' | |
| COLORS[NC]='\033[0m' | |
| COLORS[WHITE]='\033[1m' | |
| # Print a string using colors | |
| # $1 The color |
| [ | |
| {name: 'Afghanistan', code: 'AF'}, | |
| {name: 'Åland Islands', code: 'AX'}, | |
| {name: 'Albania', code: 'AL'}, | |
| {name: 'Algeria', code: 'DZ'}, | |
| {name: 'American Samoa', code: 'AS'}, | |
| {name: 'AndorrA', code: 'AD'}, | |
| {name: 'Angola', code: 'AO'}, | |
| {name: 'Anguilla', code: 'AI'}, | |
| {name: 'Antarctica', code: 'AQ'}, |