Skip to content

Instantly share code, notes, and snippets.

View Prounckk's full-sized avatar
:octocat:
mu-duck debugging

Prounckk

:octocat:
mu-duck debugging
View GitHub Profile
@Prounckk
Prounckk / delete_branches_older_than.sh
Created April 16, 2019 17:58 — forked from antonio/delete_branches_older_than.sh
Script to delete branches older than a certain date
#!/bin/sh
date=$1
for branch in $(git branch -a | sed 's/^\s*//' | sed 's/^remotes\///' | grep -v 'master$'); do
if [[ "$(git log $branch --since $date | wc -l)" -eq 0 ]]; then
if [[ "$branch" =~ "origin/" ]]; then
local_branch_name=$(echo "$branch" | sed 's/^origin\///')
if [[ "$DRY_RUN" -eq 1 ]]; then
echo "git push origin :$local_branch_name"
@Prounckk
Prounckk / install_lamp_16.sh
Created August 24, 2018 02:49 — forked from ankurk91/install_lamp_ubuntu.sh
Ubuntu 16.04 - PHP development (php 7.1, MySQL 5.7, apache 2.4)
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Ubuntu 16.04 Dev Server
# Run like - bash install_lamp.sh
# Script should auto terminate on errors
echo -e "\e[96m Adding PPA \e[39m"
sudo add-apt-repository -y ppa:ondrej/apache2