Skip to content

Instantly share code, notes, and snippets.

@Emuentes
Emuentes / two_branch_cleanup_scripts.sh
Last active October 12, 2020 19:44
SCRIPT-ONE: will print the names of the branches that have been merged into develop AND master in green. Also, branches that are only merged into develop but not master are listed in red. ---- SCRIPT-TWO: will delete the fully merged branches, those listed in green when you run SCRIPT-ONE
#######################################
# SCRIPT 1 - PREVIEW BRANCH DELETIONS #
#######################################
# will print the names of the branches that have been merged into develop and master in green and branches that are only merged into develop but not master in red.
BRANCHES_IN_MASTER=`git branch -r --merged origin/master | grep -v -E '(\*|master$|develop$)' | cut -f2- -d '/' | tr '\n' ';'` && export BRANCHES_IN_MASTER && git branch -r --merged origin/develop | grep -v -E '(\*|master$|develop$)' | cut -f2- -d '/' | xargs -L1 bash -c 'if [ $(grep -o "$0" <<< "$BRANCHES_IN_MASTER" | wc -l) -gt 0 ] ; then printf "\e[0;32m $0 \e[0m\n"; else printf "\e[0;31m $0 is merged into DEVELOP but not MASTER \e[0m\n"; fi';
#################################################################################################################################
# SCRIPT 2 - DANGER -- RUN AT YOUR OWN RISK -- The following script will DELETE the branches listed in the above preview script #
###########################
@jazzyisj
jazzyisj / mass_play_media.yaml
Last active June 29, 2025 13:42
Music Assistant Play Media Package
##################################################################################################################
# Music Assistant Play Media Package - Launch Music Assistant Library Media from HASS dashboard & automations
# Use with Play Music Assistant Media lovelace card - https://gist.github.com/jazzyisj/f90bf1c1c3205d5d2d791f196fc144b1
# Download this package file to your packages folder or add yaml to your configuration.yaml file.
# Change to one of your Music Assistant media player entity_id's where indicated with #TODO tag.
##################################################################################################################
input_boolean:
mass_shuffle:
name: "Shuffle"
icon: mdi:shuffle
@jazzyisj
jazzyisj / mass_play_media_card.yaml
Last active August 8, 2025 13:19
Play Music Assistant Media Lovelace Card
########################################################################################################
# Play Music Assistant Media - Lovelace Card
# Use with Play Music Assistant Media Package
# https://gist.github.com/jazzyisj/c53c92779785bb5d9952adf3a3a28107
########################################################################################################
type: entities
title: "Play Music Assistant Media"
icon: mdi:play-box
entities:
- entity: input_select.mass_media_type