Skip to content

Instantly share code, notes, and snippets.

View aviflombaum's full-sized avatar

Avi Flombaum aviflombaum

View GitHub Profile
@aviflombaum
aviflombaum / WORKTREE-FLOW.md
Created July 26, 2025 21:13
Better Worktree Flow for AI CLI Agents

Git Worktree Development Flow

The Problem

When using git worktrees for parallel development, gitignored files that are essential for development (like .claude/, .env, database configs, etc.) are not present in the new worktree. This breaks development workflows that depend on these files.

The Solution

A git alias that wraps git worktree add to automatically copy essential gitignored files to new worktrees.

@aviflombaum
aviflombaum / worktree.md
Created July 24, 2025 14:34
A worktree slash command for Claude Code

Create Worktree

Creates a new git worktree for a feature branch and opens it in a new terminal tab.

Usage:

  1. Set up worktrees directory

    • Default location is ../worktrees relative to project root
  • Can be customized by setting WORKTREES_DIR environment variable

RSpec Best Practices for Ruby on Rails Testing

Core Testing Philosophy

Three Fundamental Beliefs

  1. Tests should be reliable - They should pass when code works and fail when it doesn't
  2. Tests should be easy to write - Simple syntax and clear patterns
  3. Tests should be easy to understand - Readable by you and your team, now and in the future

General Best Practices

class BaseClient
class APINotFound < StandardError; end
attr_reader :auth_strategy
def initialize(auth_strategy: :headers, headers: {})
@auth_strategy = auth_strategy
@headers = headers
end
The vibe of "Opus" by Eric Prydz can be described as epic, euphoric, and captivating. The track is a progressive house masterpiece that takes listeners on a mesmerizing journey through its soaring melodies, intricate layers, and pulsating beats.
The track begins with a gentle and atmospheric introduction, gradually building up with ethereal synths and subtle percussion. As the song progresses, it evolves into a dynamic and energetic composition, featuring sweeping melodies, driving basslines, and pulsating rhythms.
"Opus" has a sense of grandeur and expansiveness, creating a feeling of being transported to another world. The uplifting and euphoric elements of the track evoke a sense of joy and excitement, making it a favorite among electronic music fans and a staple in Prydz's live performances.
The repetitive nature of the track, combined with its evolving and intricate arrangements, creates a hypnotic and immersive experience. The layers of sound blend seamlessly, creating a rich and textured sonic lands
Testing Gist
class PostsController
def create
@post = Post.new
@post.title = params[:title]
@post.save
redirect "/posts/#{@post.id}" # The show action below.
end
class PostsController
def create
@post = Post.new
@post.title = params[:title]
@post.save
redirect "/posts/#{@post.id}" # The show action below.
end

Keybase proof

I hereby claim:

  • I am aviflombaum on github.
  • I am aviflombaum (https://keybase.io/aviflombaum) on keybase.
  • I have a public key ASBF9nK4LCTi2biwf0HSZPqLlRdH4lWXzDs2glHPT3-Iawo

To claim this, I am signing this object:

@aviflombaum
aviflombaum / shape_of_me_sonic_pi.rb
Created May 8, 2019 00:41
Shape of Me, for Sonic Pi
use_bpm(96)
chord_1 = [:Db5, :Ab4, :Db4]
chord_2 = [:E5, :Ab4, :Db4]
chord_3 = [:Db5, :Ab4, :Db4]
chord_4 = [:Db5, :A4, :Gb3]
chord_5 = [:E5, :A4, :Gb3]
chord_6 = [:Db5, :A4, :Gb3]
chord_7 = [:Db5, :A4, :A3]
chord_8 = [:E5, :A4, :A3]