Skip to content

Instantly share code, notes, and snippets.

View wayne-weibel's full-sized avatar
💭
Something witty!

Wayne Weibel wayne-weibel

💭
Something witty!
View GitHub Profile
@wayne-weibel
wayne-weibel / reset_hook_post_update.php
Last active January 24, 2023 10:44
Drupal 9.x Drush 10.x PHP Script to Reset Post Update Hooks, see https://drupal.stackexchange.com/q/238682/11788
<?php
use Drush\Commands\DrushCommands;
/**
* @file
* Reset module hook_post_update_NAME
*
* A tool for developing and debugging post_update hooks.
*

Keybase proof

I hereby claim:

  • I am wayne-weibel on github.
  • I am wayneweibel (https://keybase.io/wayneweibel) on keybase.
  • I have a public key whose fingerprint is 06B5 EC02 67E9 234D 8F4A C210 EE6D 42EC 910C 27F2

To claim this, I am signing this object:

@wayne-weibel
wayne-weibel / gist:46c862981b9a558d107a4e4fdffc34a1
Created September 28, 2018 13:07
bash delete local branches except matching
git branch --list | grep -vP 'master|develop' | xargs git branch -D
@wayne-weibel
wayne-weibel / bash delete remote branches
Last active September 12, 2018 20:58
single line bash command to delete remote repos. replace grep regex as necessary (but i would leave 'master' included lol)
for branch in `git branch -a | awk -F"/" '{ print $3 }' | grep -Pv '^(master|develop)' | grep -P '^\d'`; do echo $branch; git push origin --delete $branch; done