Skip to content

Instantly share code, notes, and snippets.

View robacarp's full-sized avatar
🐢
Bacon//Pickle

Rob robacarp

🐢
Bacon//Pickle
View GitHub Profile
@mfranceschit
mfranceschit / managing-multiple-claude-code-subscriptions.md
Last active September 5, 2026 20:56
Managing Multiple Claude Code Subscriptions per Project

Managing Multiple Claude Code Subscriptions per Project

This tutorial shows how to use direnv and the CLAUDE_CONFIG_DIR environment variable to maintain fully isolated Claude Code sessions per project, each pointing to a different subscription. Zero friction when switching contexts.

How it works

Claude Code stores its configuration and OAuth tokens under a config directory. By default this is a single shared path, which means one session for all your work.

The CLAUDE_CONFIG_DIR environment variable lets you override that path. Point it to a different directory per project and Claude Code will treat each one as a completely independent environment — separate login, separate session, separate subscription.

@davidcharlesweber
davidcharlesweber / ruby-jmeter test plan as rake file
Last active April 28, 2020 05:56
Gist for ruby-jmeter that will happily down a production rails app for you. Assumes that the application is using devise. Change thread count, duration and rampup to your needs. This will sign in as two different types of uses as a sample. Modify for your needs.
desc 'Generate and execute jmeter test plan'
task :generate_jmeter_plan do |t, args|
require 'ruby-jmeter'
generate_report
end
def generate_report
uri = URI('https://yourapp.com')
domain = uri.host
test do
@bcardiff
bcardiff / list-deps.cr
Last active May 29, 2024 17:37
List binary dependencies to build a minimal docker image from scratch
unless ARGV.size > 0
puts " Missing executable file argument"
puts " Usage (in a Dockerfile)"
puts " RUN crystal run ./path/to/list-deps.cr -- ./bin/executable"
exit 1
end
executable = File.expand_path(ARGV[0])
unless File.exists?(executable)
@mems
mems / gist:5301297
Last active February 26, 2025 11:47
How to convert a (simple) SWF to PDF

Convert (simple) SWF to PDF

In SWFTools a programs called gfx2gfx is available to do this task, but it's not officially available precompiled.

It can convert SWF, PDF or image to SWF, PDF, ebook or image.

For discard downscaling for rasterized image (default: 72dpi) we use the provided by @m-p-y: add -r attribute to increase maxdpi

Requirements