Skip to content

Instantly share code, notes, and snippets.

Avatar

Phill Pafford phillpafford

View GitHub Profile
View git-checkout-latest-tag
#!/usr/bin/env bash
##
# check out latest semvar tag from git master repo
##
## exit if script fails
set -e
## get current branch checked out
CURRENT=`git rev-parse --abbrev-ref HEAD`
View gist:605f02c0b6dc6cf66958a32024fa0ba8
#!/bin/bash
## http://nginx.org/en/docs/control.html
## https://www.nginx.com/resources/wiki/start/topics/examples/logrotation/
## idea is to run this cron job at 12:59 PM daily to move the existing access and error logs and reload nginx
DEBUG=true
CURRENT_DATE=$(date +"%Y-%m-%d")
PROJECT_NAME="test.project"
View docker.cleanup.sh
#!/usr/bin/env bash
#
# list running docker containers
# https://coderwall.com/p/ewk0mq/stop-remove-all-docker-containers
echo ================== START DOCKER STOP AND REMOVE ALL CONTAINERS ==================
docker images
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
You can’t perform that action at this time.