Current version: 1.0.19 1.0.15 (as of 2018-12-10)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# zshenv path_helper issue script. | |
# Source: https://gist.github.com/romanr/2c5ee2eafc284a2530cdb6b8d64d929c | |
# Based on https://gist.github.com/Linerre/f11ad4a6a934dcf01ee8415c9457e7b2 | |
# | |
# if [ -f "/etc/zprofile" ] && grep -q "path_helper" "/etc/zprofile"; then | |
# echo "WARNING: 'path_helper' in '/etc/zprofile', please remove it." >&2 | |
# echo "Path helper 'path_helper' will execute after the one in this '~/.zshenv' file and" >&2 | |
# echo "potentially reorder paths." >&2 | |
# fi | |
unsetopt GLOBAL_RCS |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commands: | |
000_dd: | |
test: test ! -e /swapfile | |
command: dd if=/dev/zero of=/swapfile bs=1M count=2048 && chmod 600 /swapfile | |
001_mkswap: | |
command: mkswap /swapfile | |
ignoreErrors: true | |
002_swapon: | |
command: swapon /swapfile | |
ignoreErrors: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# for use with cron, eg: | |
# 0 3 * * * postgres /var/db/db_backup.sh foo_db | |
if [[ -z "$1" ]]; then | |
echo "Usage: $0 <db_name> [pg_dump args]" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
container_commands: | |
01_fix_static_cors: | |
command: "/tmp/fix_static_cors.sh" | |
files: | |
"/tmp/fix_static_cors.sh": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
#!/bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# This script will DESTROY /dev/xvdb and /dev/xvdc and remount them | |
# for Docker temp and volume storage. | |
# It is intended for EC2 instances with 2 ephemeral SSD instance stores | |
# like the c3.xlarge instance type. | |
service docker stop || true | |
# Setup Instance Store 0 for Docker Temp | |
# (set in /etc/default/docker) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################################################### | |
# these are instructions for automating the suspend and shutdown of esxi vm's and host in case of a | |
# power failure. | |
# works with apc smartups 750xl and esxi 5.5u1 | |
############################################################################################################### | |
0# make a new VM and install Ubuntu-Server on it | |
1# install apcupsd | |
apt-get install apcupsd |
NewerOlder