This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command
$ docker-compose up -d
# To Tear Down
$ docker-compose down --volumes
#!/bin/bash | |
mkdir wordpress-site && cd wordpress-site | |
touch docker-compose.yml | |
cat > docker-compose.yml <<EOL | |
version: "2" | |
services: | |
my-wpdb: |
#!/usr/bin/env python | |
import os | |
import sys | |
import re | |
def read_env(): | |
"""Pulled from Honcho code with minor updates, reads local default | |
environment variables from a .env file located in the project root | |
directory. |
Backup: | |
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql | |
Restore: | |
cat your_dump.sql | docker exec -i your-db-container psql -Upostgres |
autocomplete="off"
onto <form>
element;<input>
with autocomplete="false"
as a first children element of the form.<form autocomplete="off" method="post" action="">
<input autocomplete="false" name="hidden" type="text" style="display:none;">
...
This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x
The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/
#!/bin/sh | |
# Cleanup docker files: untagged containers and images. | |
# | |
# Use `docker-cleanup -n` for a dry run to see what would be deleted. | |
untagged_containers() { | |
# Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1. | |
# NOTE: "[0-9a-f]{12}" does not work with GNU Awk 3.1.7 (RHEL6). | |
# Ref: https://github.com/blueyed/dotfiles/commit/a14f0b4b#commitcomment-6736470 | |
docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $'$1'}' |
# Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/ | |
# GitLab uses docker in the background, so we need to specify the | |
# image versions. This is useful because we're freely to use | |
# multiple node versions to work with it. They come from the docker | |
# repo. | |
# Uses NodeJS V 9.4.0 | |
image: node:9.4.0 | |
# And to cache them as well. |
function importFontNotoSansCJKjpRegular(jsPdfDoc) { | |
if (!jsPdfDoc) return; | |
jsPdfDoc.addFileToVFS('NotoSansCJKjp-Regular.ttf','AAEAAAANAIAAAwBQRkZUTXas8jIADxLYAAAAHEdERUYAKRA8AA8SuAAAAB5PUy8ywjboQwAAAVgAAABWY21hcM+tTs8AACQgAABX2mdhc3D//wADAA8SsAAAAAhnbHlmHuJx0gAAvNgADVUsaGVhZAe8do4AAADcAAAANmhoZWEH2APCAAABFAAAACRobXR4AmrW+gAAAbAAACJubG9jYV+I4xgAAHv8AABA3G1heHAQjADLAAABOAAAACBuYW1li6KVSAAOEgQAAAGhcG9zdBcZx50ADhOoAAD/BQABAAAAAQAAF3dSEl8PPPUACwPoAAAAANJwmYAAAAAA0nCZgP/U/ukD6AO/AAAACAACAAEAAAAAAAEAAAO//ukAWgP2/9T/4QPoAAEAAAAAAAAAAAAAAAAAAAEBAAEAABA2AMgAFAAAAAAAAgAAAAEAAQAAAEAAAAAAAAAAAQHSAZAABQAAAooCvAAAAIwCigK8AAAB4AAxAQIAAAIABQMAAAAAAACAAAKDCAdo6AAAABAAAAAAUGZFZAAAACD/5QMg/zgAWgSIAUAAEgAEAAAAAAAAA+gAAAAAAAABTQAAAOAAAAFDAF8CKwAoAisAOgOZACcCqAAkARYAWgFSAFwBUgArAdMAQAIrACYBFgA1AVsALgEWAEkBiAALAisAMQIrAFgCKwAoAisAHQIrABQCKwAcAisAOAIrADECKwAtAisALAEWAEkBFgA1AisAJgIrACYCKwAmAdoAKwOyADgCXwADApEAZAJ+ADoCrwBkAkwAZAIoAGQCsQA6AtgAZAElAGQCGAAjAoYAZAIeAGQDLABkAtIAZALmADoCeABkAuYAOgJ7AGQCVQAvAlcAHwLRAGECPwABA24AGQI9ABECE |
# Pass the env-vars to MYCOMMAND | |
eval $(egrep -v '^#' .env | xargs) MYCOMMAND | |
# … or ... | |
# Export the vars in .env into your shell: | |
export $(egrep -v '^#' .env | xargs) |