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
class DeferredPromise extends Promise { | |
constructor(def = (res, rej)=>{}) { | |
let res, rej; | |
super((resolve, reject)=>{ | |
def(resolve, reject); | |
res = resolve; | |
rej = reject; | |
}); | |
this.resolve = res; |
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
#!/usr/bin/env bash | |
# vim:set ft=bash ts=4 sw=4 et : | |
# shellcheck shell=bash | |
# shellcheck disable=SC2317 | |
## Usage: | |
## docker-etc-hosts-install | |
## Installs docker container names and IP addresses in /etc/hosts | |
## This script is idempotent | |
## Note: Requires root privileges to write to /etc/hosts |
OlderNewer