Skip to content

Instantly share code, notes, and snippets.

View LeipeLeon's full-sized avatar
🕳️

Leon Berenschot LeipeLeon

🕳️
View GitHub Profile
@searls
searls / auto_commit.sh
Last active February 23, 2026 08:54
I got sick of trying to figure out the best time to commit code between me and Claude. I simultaneously found bugs in Claude's checkpoint and rewind system. So now I just auto-commit on every turn with the title being whatever claude just said and the body being whatever my prompt was. (I also often want to go back and replay my prompts when Cla…
#!/bin/bash
# Auto commits after each Claude turn if:
# - A STOP hook is configured that runs this script
# - A <repo_root>.claude/auto_commit.json file has key "enabled" set to `true`
set -euo pipefail
INPUT=$(cat)
# Find git root; bail if not a repo
GIT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null) || exit 0
@deviationist
deviationist / prevent-rekordbox-start-automatically.sh
Last active February 22, 2023 11:07
Prevent Rekordbox (v6.6.8) from starting on boot (for macOS)
# To prevent Rekordbox from starting during boot
: > ~/Library/LaunchAgents/com.pioneerdj.rekordboxdj.agent.plist && chflags uchg ~/Library/LaunchAgents/com.pioneerdj.rekordboxdj.agent.plist
# To undo the change
chflags nouchg ~/Library/LaunchAgents/com.pioneerdj.rekordboxdj.agent.plist
require "bundler/inline"
gemfile do
source 'https://rubygems.org'
gem "rspec", "~> 3.10"
end
require "rspec/autorun"
RSpec.configure do |config|
@wagenet
wagenet / application_policy.rb
Created May 6, 2021 21:25
Graphiti + Pundit
# frozen_string_literal: true
class ApplicationPolicy
attr_reader :user, :record
def initialize(user, record)
@user = user
@record = record
end
@kekru
kekru / git-copy-files-to-empty-branch.md
Last active February 26, 2024 05:51
git: Copy files to new branch without history, using a squash merge

Git: New branch with files but no history

This is how to copy your files from a given git branch to a new empty branch, using a squash merge.
This example will copy files from branch old-branch to target-branch

# First be sure, that you don't have uncommitted working changes. They will be deleted

# Checkout a new empty branch without history
git checkout --orphan target-branch

FFmpeg Minimal Build for RTMP Streaming

This tutorial will work you through steps of configuring an FFmpeg build tailored for RTMP streaming on macOS. At first I think of making it support general live streaming, with additional protocols like HLS, but to keep things simple let's stick with RTMP for now. (Anyway, I do include HLS in the protocol list as well as some related bitstream filters but it's untested.)

Goal

The built FFmpeg executable should

@WaKeMaTTa
WaKeMaTTa / Gemfile
Created October 17, 2016 12:07 — forked from remino/Gemfile
kramdown-rails: Use Kramdown (Markdown) in Rails 4
# Gemfile
gem 'kramdown'
@chrismdp
chrismdp / s3.sh
Last active January 14, 2026 15:31
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@rogercampos
rogercampos / delayed_versions.rb
Created January 10, 2013 08:20
carrierwave delayed version processing
module Carrierwave
module DelayedVersions
extend ActiveSupport::Concern
module ClassMethods
def delayed_versions
@delayed_versions ||= Set.new
end
def delayed_version(name, opts = {}, &block)
@jasonrudolph
jasonrudolph / about.md
Last active November 13, 2025 16:55
Programming Achievements: How to Level Up as a Developer