Skip to content

Instantly share code, notes, and snippets.

View storrence88's full-sized avatar
๐Ÿค“
๐ŸŽถ ๐Ÿ’ป. ๐ŸŒฎ

Steven Torrence storrence88

๐Ÿค“
๐ŸŽถ ๐Ÿ’ป. ๐ŸŒฎ
View GitHub Profile
#!/bin/bash
# ๐ŸŽ‰ 2025 Shell Wrapped
# A "Spotify Wrapped" style summary of your shell command usage
#
# Usage: curl -sL <gist-raw-url> | bash
# or: chmod +x shell-wrapped-2025.sh && ./shell-wrapped-2025.sh
# โš ๏ธ SAFETY: This script is 100% read-only. It only reads your shell
# history file and prints statistics. No files are modified or deleted.
# Feel free to audit the code below before running.

The Unofficial 37signals/DHH Rails Style Guide

About This Document

This style guide was generated by Claude Code through deep analysis of the Fizzy codebase - 37signals' open-source project management tool.

Why Fizzy matters: While 37signals has long advocated for "vanilla Rails" and opinionated software design, their production codebases (Basecamp, HEY, etc.) have historically been closed source. Fizzy changes that. For the first time, developers can study a real 37signals/DHH-style Rails application - not just blog posts and conference talks, but actual production code with all its patterns, trade-offs, and deliberate omissions.

How this was created: Claude Code analyzed the entire codebase - routes, controllers, models, concerns, views, JavaScript, CSS, tests, and configuration. The goal was to extract not just what patterns are used, but why - inferring philosophy from implementation choices.

@storrence88
storrence88 / eslint_prettier_airbnb.md
Created April 8, 2023 22:52 — forked from bradtraversy/eslint_prettier_airbnb.md
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@storrence88
storrence88 / friendship.rb
Created February 27, 2021 19:41 — forked from jibiel/friendship.rb
DRY Mutual Friendships / Friends in Ruby on Rails
# app/models/friendship.rb
class Friendship < ApplicationRecord
belongs_to :user
belongs_to :friend, class_name: 'User'
end
// This code is to be used with https://turbo.hotwire.dev. By default Turbo keeps visited pages in its cache
// so that when you visit one of those pages again, Turbo will fetch the copy from cache first and present that to the user, then
// it will fetch the updated page from the server and replace the preview. This makes for a much more responsive navigation
// between pages. We can improve this further with the code in this file. It enables automatic prefetching of a page when you
// hover with the mouse on a link or touch it on a mobile device. There is a delay between the mouseover event and the click
// event, so with this trick the page is already being fetched before the click happens, speeding up also the first
// view of a page not yet in cache. When the page has been prefetched it is then added to Turbo's cache so it's available for
// the next visit during the same session. Turbo's default behavior plus this trick make for much more responsive UIs (non SPA).
# Refactoring conditional logic using short-circut evaluation and ruby implicit return
# before refactor
def straight_flush?(array)
if straight?(array) and flush?(array)
return true
else
return false
end
end
@storrence88
storrence88 / rails_eager_load.md
Created March 28, 2020 18:37 — forked from johncip/rails_eager_load.md
Active Record eager loading strategies

N+1 query problem

  • ORMs make it easy to a query per loop iteration, which we want to avoid

eager_load

  • single query (left outer join)
  • can reference the other table's columns in where

preload

  • a few queries (one per table)
  • typically faster
@storrence88
storrence88 / README-Template.md
Created April 29, 2019 12:22 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites