Skip to content

Instantly share code, notes, and snippets.

View nuclearglow's full-sized avatar

Sven Vowe nuclearglow

View GitHub Profile
# delete all local merged branches with no activity within the last week
for k in $(git branch --merged | sed /\*/d); do
if [ -z "$(git log -1 --since='1 week ago' -s $k)" ]; then
echo git branch -d $k
fi
done
# delete all merged remote branches with no activity within the last month
for k in $(git branch -r --merged | cut -d ' ' -f3 | sed /\*/d); do
if [ -z "$(git log -1 --since='1 month ago' -s $k)" ]; then
@nuclearglow
nuclearglow / glob-up-and-running.md
Created August 16, 2018 09:12 — forked from reggi/glob-up-and-running.md
A tutorial on how to get started using glob patterns in your terminal. #writing

Glob Up and Running

To test a glob pattern go over to globtester and play around with creating your own file structure online, it's super easy to get started that way.

If you want to test out a glob pattern in the terminal use echo followed by the pattern, for instance.

echo **/*.js