Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am wgardiner on github.
  • I am wgardiner (https://keybase.io/wgardiner) on keybase.
  • I have a public key ASCa_AOsKhafhG_nCp-hatb8mQoKi2Wthe_wPjJaIcKqiwo

To claim this, I am signing this object:

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/sh
PARAMS=$@
VALUES=""
# List all API endpoints
entries=$(env | grep API_ENDPOINT)
# Parse and normalize entries
HAS_ENDPOINTS=0
version: "3"
services:
#
# Database
#
database:
image: mysql:5.7
environment:
@wgardiner
wgardiner / dashboard.js
Created October 6, 2018 01:19
Lazy script loading from ES Module script
const dashboard = {
loadLodash: () => {
return new Promise((resolve, reject) => {
const script = document.createElement('script');
script.src = 'https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.js';
script.onload = () => resolve(_);
script.onerror = () => reject('Error loading Lodash');
document.body.appendChild(script);
});
},