Skip to content

Instantly share code, notes, and snippets.

View doolin's full-sized avatar

Dave Doolin doolin

View GitHub Profile
@doolin
doolin / file.md
Created March 13, 2023 12:00 — forked from jjb/file.md
Using Jemalloc 5 with Ruby.md

This is a very quick gist I'm throwing together to get this info and discussion onto google in one place.

For years, people have been using jemalloc with ruby. There are various benchmarks and discussions. Some people say Jemalloc 5 doesn't work as well as Jemalloc 3.

Then, one day, hope appeared on the horizon. Someone offered a config for Jemalloc 5.

The recipe would be something like this (shown with official docker ruby image). I didn't try this yet, don't know if it will build!

@doolin
doolin / falsehoods-programming-time-list.md
Created March 5, 2024 13:31 — forked from timvisee/falsehoods-programming-time-list.md
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@doolin
doolin / code.rb
Created April 18, 2024 11:17 — forked from jjb/code.rb
Hacking ruby patterns to be first-class objects that can be passed around
# need to "pin" the variable, but this only works with the lambda because
# pattern matching falls back to case matchint (=== on any object in ruby,
# which is NOT "identical object" as in JS)
def matches1(pat,x)
case x
in ^pat
puts true
else
puts false
end
@doolin
doolin / tree_enumerator.rb
Created August 17, 2024 18:47 — forked from JoelQ/tree_enumerator.rb
Demonstration of how using `Enumerator` makes it nicer to work with a data structure that has multiple valid traversals such as a binary tree
class Tree
attr_reader :val, :left, :right
def self.empty
EmptyTree.new
end
def self.leaf(val)
new(val, empty, empty)
end
@doolin
doolin / CONVENTIONS.md
Created March 15, 2025 01:01 — forked from peterc/CONVENTIONS.md
CONVENTIONS.md file for AI Rails 8 development
  • You MUST NOT try and generate a Rails app from scratch on your own by generating each file. For a NEW app you MUST use rails new first to generate all of the boilerplate files necessary.
  • Create an app in the current directory with rails new .
  • Use Tailwind CSS for styling. Use --css tailwind as an option on the rails new call to do this automatically.
  • Use Ruby 3.2+ and Rails 8.0+ practices.
  • Use the default Minitest approach for testing, do not use RSpec.
  • Default to using SQLite in development. rails new will do this automatically but take care if you write any custom SQL that it is SQLite compatible.
  • An app can be built with a devcontainer such as rails new myapp --devcontainer but only do this if requested directly.
  • Rails apps have a lot of directories to consider, such as app, config, db, etc.
  • Adhere to MVC conventions: singular model names (e.g., Product) map to plural tables (products); controllers are plural.
  • Guard against incapable browsers accessing controllers with `allo
@doolin
doolin / repo-based-project-management.md
Last active July 2, 2026 21:24
Repo-based project management

Repo-based project management

Development Tracking from the Git Repository

The directory is .development/ — not .project/ — because the work this directory captures is the development of the repo's contents. A repo may contain many projects; "development" names the activity that applies regardless of how many projects live inside.

For software agents:

@doolin
doolin / VSDD.md
Created March 3, 2026 12:30 — forked from dollspace-gay/VSDD.md
Verified Spec-Driven Development

Verified Spec-Driven Development (VSDD)

The Fusion: VDD × TDD × SDD for AI-Native Engineering

Overview

Verified Spec-Driven Development (VSDD) is a unified software engineering methodology that fuses three proven paradigms into a single AI-orchestrated pipeline:

  • Spec-Driven Development (SDD): Define the contract before writing a single line of implementation. Specs are the source of truth.
  • Test-Driven Development (TDD): Tests are written before code. Red → Green → Refactor. No code exists without a failing test that demanded it.
@doolin
doolin / ADR-001-lambda-project-bootstrap.md
Created March 17, 2026 00:43
ADR: Standard pattern for bootstrapping a Lambda web application

id: ADR-001 title: Standard pattern for bootstrapping a Lambda web application status: Proposed date: 2026-03-16 authors: [David Doolin] owner: David Doolin reviewers: [] approvers: [] decision_type: Technical

@doolin
doolin / tasteful-commits.md
Last active March 31, 2026 00:58
tasteful-commits: Claude Code skill for well-crafted git commits (52-57 char lines, templates, co-author credits)

tasteful-commits: Claude Code skill for well-crafted git commits (52-57 char lines, templates, co-author credits)


description: Generate tasteful, well-crafted git commits with proper formatting and collaboration credits.

Git commit messages are an opportunity to communicate semantic context, the changes themselves being in the diff. But sometimes, just a list what changed can also be appropriate. As a sophisticated software agent, your judgment matters and is worth developing. Here, you are creating a tasteful git commit. Follow these steps:

Step 0: Pre-staging

@doolin
doolin / new-gem.md
Last active July 13, 2026 00:42
Claude Code /new-gem skill: Bootstrap a Ruby gem with RSpec, RuboCop, CI, and standard metadata
name new-gem
description Bootstrap a new Ruby gem with RSpec, RuboCop, rubocop-rspec, SimpleCov, CI, and standard metadata.

Bootstrap a new Ruby gem using the arguments provided: $ARGUMENTS

The arguments should be parsed as: GEM_NAME followed by an optional summary in quotes. Example: /new-gem my_gem "A short description of the gem"