Skip to content

Instantly share code, notes, and snippets.

@mabarbeau
mabarbeau / git-rebase-auto-resolve-yarn-lock.zsh
Last active May 30, 2025 04:24
A `git rebase` that auto resolves conflicts in yarn.lock
rebase () {
if [ $# -ne 0 ]; then;
locks=$(find . -name "yarn.lock" -not -path "./node_modules/*" -not -path "*/node_modules/*" | tr '\n' ' ')
output=$(git rebase $@) && echo $output
if echo $output | grep 'CONFLICT' | grep -q 'yarn.lock'; then
echo -e "\n\033[4;33mConflicts found in yarn.lock\n\033[0m\033[2;20mAuto merging\033[0m\n" \
&& git checkout $1 -- $(echo $locks) \
&& yarn install \
@mabarbeau
mabarbeau / Flexible-animated-gradient.markdown
Created February 19, 2015 17:17
Flexible animated gradient

Flexible animated gradient

Gradient functionality can easily be manipulated to create drastically different effects.

A Pen by Marc Barbeau on CodePen.

License.