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
FROM adminer:4.8.0 | |
# WATCH OUT WHEN UPGRADING, THE SED BELOW MIGHT STOP WORKING | |
USER root | |
RUN apk add autoconf gcc g++ make libffi-dev openssl-dev | |
RUN pecl install mongodb | |
RUN echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/docker-php-ext-mongodb.ini | |
# MongoDB allows connections without password. | |
# But that doesn't fly with Adminer which prints 'Database does not support password.' for such case. |
'use strict'; | |
const fetch = require('node-fetch') | |
, base64stream = require('base64-stream'); | |
const URL = 'https://www.google.de/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'; | |
fetch(URL) | |
.then((res) => { | |
return new Promise((resolve, reject) => { |
'use strict'; | |
/** | |
* Basic code to parse the values in the "data" attribute in a Google Maps URL to an Array. | |
* There will likely still be some work to do to interpret the resulting Array. | |
* | |
* Based on information from: | |
* http://stackoverflow.com/a/34275131/1852838 | |
* http://stackoverflow.com/a/24662610/1852838 | |
*/ |
<?xml version="1.0" encoding="UTF-8"?> | |
<templateSet group="WordPress"> | |
<template name="aa" value="add_action( '$hook$', '$callback$' ); $END$" description="add_action" toReformat="false" toShortenFQNames="true"> | |
<variable name="hook" expression="" defaultValue="" alwaysStopAt="true" /> | |
<variable name="callback" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="HTML_TEXT" value="false" /> | |
<option name="HTML" value="false" /> | |
<option name="XSL_TEXT" value="false" /> | |
<option name="XML" value="false" /> |
<?php namespace GM; | |
class PointersManager implements PointersManagerInterface { | |
private $pfile; | |
private $version; | |
private $prefix; | |
private $pointers = array(); | |
public function __construct( $file, $version, $prefix ) { |
#! /usr/bin/env bash | |
### | |
# | |
# install_mysql.sh | |
# | |
# This script assumes your Vagrantfile has been configured to map the root of | |
# your application to /vagrant and that your web root is the "public" folder | |
# (Laravel standard). Standard and error output is sent to | |
# /vagrant/vm_build.log during provisioning. |
<?php | |
// rewrite /wp-content/themes/theme-name/css/ to /css/ | |
// rewrite /wp-content/themes/theme-name/js/ to /js/ | |
// rewrite /wp-content/themes/theme-name/img/ to /img/ | |
// rewrite /wp-content/plugins/ to /plugins/ | |
function roots_flush_rewrites() { | |
global $wp_rewrite; | |
$wp_rewrite->flush_rules(); | |
} |
#!/bin/bash | |
# Install script for Latest WordPress by Johnathan Williamson - extended by Don Gilbert | |
# Disclaimer: It might not bloody work | |
# Disclaimer 2: I'm not responsible for any screwups ... :) | |
# DB Variables | |
echo "MySQL Host:" | |
read mysqlhost | |
export mysqlhost |