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
| addEventListener("fetch", event => { | |
| event.respondWith(handleRequest(event.request)) | |
| }) | |
| let body = {}; | |
| async function handleRequest(request) { | |
| let content = "just drop if it fails...okay ?"; | |
| for( var i of request.headers.entries() ) { | |
| content += i[0] + ": " + i[1] + "\n"; | |
| } | |
| let respContent = ""; |
| async function readRequestBody(request) { | |
| const { headers } = request; | |
| const contentType = headers.get('content-type') || ''; | |
| if (contentType.includes('application/json')) { | |
| return JSON.stringify(await request.json()); | |
| } else if (contentType.includes('form')) { | |
| const formData = await request.formData(); | |
| const body = {}; | |
| for (const entry of formData.entries()) { | |
| body[entry[0]] = entry[1]; |
| # study stream aliases | |
| # Requires https://github.com/caarlos0/timer to be installed. spd-say should ship with your distro | |
| declare -A pomo_options | |
| pomo_options["work"]="45" | |
| pomo_options["break"]="10" | |
| pomodoro () { | |
| if [ -n "$1" -a -n "${pomo_options["$1"]}" ]; then | |
| val=$1 |
| # I'll be doing another one for Linux, but this one will give you | |
| # a pop up notification and sound alert (using the built-in sounds for macOS) | |
| # Requires https://github.com/caarlos0/timer to be installed | |
| # Mac setup for pomo | |
| alias work="timer 60m && terminal-notifier -message 'Pomodoro'\ | |
| -title 'Work Timer is up! Take a Break 😊'\ | |
| -appIcon '~/Pictures/pumpkin.png'\ | |
| -sound Crystal" |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
| <meta name="viewport" content="width=device-width,initial-scale=1.0" /> | |
| <link rel="stylesheet" href="style.css" /> | |
| <script src="response.js" async defer></script> | |
| <title>Custom Response</title> | |
| </head> |
| @font-face { | |
| font-family: SegoeUI; | |
| src: | |
| local("Segoe UI Light"), | |
| url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.woff2) format("woff2"), | |
| url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.woff) format("woff"), | |
| url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.ttf) format("truetype"); | |
| font-weight: 100; | |
| } |