Sauce: https://linuxhint.com/cleanup-docker/
#!/bin/bash
docker ps -a -f status=exited -q | xargs -r docker rm
docker image prune -f
docker volume ls -f dangling=true -q | xargs -r docker volume rm| #!/usr/bin/env ruby | |
| # Usage: | |
| # | |
| # Go to wowhead.com and create an item list, for example: | |
| # https://www.wowhead.com/items/trade-goods?filter=87:166;11:1;0:0 | |
| # | |
| # Once you're happy with the list, copy the URL from your browser | |
| # and pass the URL as a parameter to this script. | |
| # | |
| # The script will, hopefully, extract the list of items, and then it |
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| trap cleanup SIGINT SIGTERM ERR EXIT | |
| script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
| usage() { | |
| cat <<EOF | |
| Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
| # use ImageMagick convert | |
| # the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf | |
| convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf |
| #!/bin/bash | |
| BACKUP_DIR="${HOME}/.chrome_extension_settings_backup" | |
| DATE=$(date +%F) | |
| BACKUP_FILE="${BACKUP_DIR}/extension_settings-${DATE}.tar.gz" | |
| mkdir -p "${BACKUP_DIR}" | |
| cd "${HOME}" |
| # This file would normally be /etc/logrotate.d/vault.conf | |
| # With these settings, your audit folder will like | |
| # . | |
| # ├── audit.2018-09-10.log.gz | |
| # ├── audit.2018-09-11.log | |
| # └── audit.log | |
| # Change the path below to your own audit log path. | |
| /var/log/vault/audit.log { |
| { | |
| "interfaces": { | |
| "ethernet": { | |
| "eth0": { | |
| "address": [ | |
| "10.0.0.1/29", | |
| "10.0.0.2/29" | |
| ], | |
| "firewall": { | |
| "in": { |
Sauce: https://linuxhint.com/cleanup-docker/
#!/bin/bash
docker ps -a -f status=exited -q | xargs -r docker rm
docker image prune -f
docker volume ls -f dangling=true -q | xargs -r docker volume rm| #!/bin/bash | |
| MASTER="$(puppet config print server)" | |
| CA_DIR="/usr/local/share/ca-certificates" | |
| curl -kv "https://$MASTER:8140/puppet-ca/v1/certificate/ca?environment=production&fail_on_404=true"|tee $CA_DIR/$MASTER.crt | |
| openssl x509 -in $CA_DIR/$MASTER.crt -noout -subject -startdate -enddate | |
| cp $CA_DIR/$MASTER.crt /etc/puppetlabs/puppet/ssl/certs/ca.pem | |
| update-ca-certificates |
| # Read system health check | |
| path "acme/*" { | |
| capabilities = ["create", "read", "update", "delete", "list"] | |
| } | |
| # Read system health check | |
| path "sys/health" { | |
| capabilities = ["read", "sudo"] | |
| } |
| --- | |
| # common values in inventory/group_vars/all.yaml | |
| - hosts: vault_do | |
| become: true | |
| roles: | |
| - role: ansible-role-vault | |
| vars: | |
| vault_ansible_group: 'vault_do' | |
| vault_tls_leader_servername: 'vault.local' | |
| vault_cluster_name: vault-primary |