Skip to content

Instantly share code, notes, and snippets.

View mathd's full-sized avatar

Mathieu Dupuis mathd

View GitHub Profile
#!/usr/bin/env zsh
# Worktree Manager (zsh) — v2
# - Sourceable from .zshrc (no copy/paste edits needed)
# - Auto-detects current git repo (no <project> arg)
# - Supports deep trees (mirrors repo path under W_WORKTREES_DIR)
# - Trailing-slash normalization + newline-safe parsing
# - Safer branch handling (reuse local/remote if present)
# - Inline completion (no external file)
# =========
"\e[A": history-search-backward
"\e[B": history-search-forward
set show-all-if-ambiguous on
set completion-ignore-case on
@mathd
mathd / Hibernate dirty interceptor
Created November 27, 2017 16:23
Hibernate dirty interceptor. Help to find what causes hibernate to flag a table dirty
/* Interceptor */
package net.premieresloges.backend;
import java.io.Serializable;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.logging.Log;
@mathd
mathd / 0_reuse_code.js
Created March 11, 2014 13:43
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console