docker system prune
To remove any stopped containers and all unused images (not just dangling images), add the -a flag to the command:
// objectsToProcess - array of objects to process | |
// asyncFunction - asynct function that take objectsToProcess item as argument and return a promise | |
Promise.all(objectsToProcess.map(asyncFunction)) | |
.then(values => { console.log(values) }) | |
.catch(reason => { console.log(reason) }); |
Promise.all(objectsToProcess.reduce((sum, item) => { | |
if (item && item.shouldProcess) { | |
sum.push(asyncFunction(item)); | |
} | |
return sum; | |
}, [])) | |
.then(values => { console.log(values); }) | |
.catch(reason => { console.log(reason); }); |
function delay(time) { | |
return new Promise(fulfill => { | |
setTimeout(fulfill, time); | |
}); | |
} | |
Promise.race([longRunningPromise, delay(time).then(function () { | |
throw new Error('Operation timed out'); | |
})]) | |
.then(value => { console.log(value); }) |
// objectsToProcess - array of objects to process | |
// asyncFunction - asynct function that take objectsToProcess item as argument and return a promise | |
var promise = objectsToProcess.reduce((accumulator , item) => { | |
return accumulator.then(asyncFunction(item)); | |
}, Promise.resolve()); | |
promise | |
.then(console.log) | |
.catch(console.log); |
You will need Powerline fonts that you can install from here https://github.com/powerline/fonts. Afterwards you should update your fonts in iTerm2.
brew cask install iterm2
# Unbind C-b as the default prefix | |
unbind C-b | |
# Set new default prefix | |
set-option -g prefix ` | |
set -g default-terminal "screen-256color" | |
set -g default-shell $SHELL | |
set -g default-command "reattach-to-user-namespace -l ${SHELL}" |
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
Purpose of this document is to provide instruction on how to create docker image for convenient way of running ORT tool in order to assess license compliance of project license compliance.
To create the Docker image first the ORT project follow these steps: