SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"realpath ../testsID="$(basename $SCRIPT_DIR)-prod"
trap "docker kill $ID" INT # trap ctrl-c and call ctrl_c()
docker build -t "$ID" "$SCRIPT_DIR" &&
docker run --name="$ID" --rm -di $ID &&
docker logs --follow "$ID"#!/usr/bin/env bash
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
docker run --rm -v "$SCRIPT_DIR":/app \
-w "/app" \
-it "mileschou/xdebug:7.4" \
"./vendor/bin/phpunit"# update local branch based on
git clean -f -x && git pull upstream master --rebase && git push --force
# publish your changes
git push --force
# update local branch
git pull --rebase upstream master
git rebase --continue && git push --force
ok () { echo -e "\033[0;32m$@\033[0m"; }
error () { echo -e "\033[0;31m$@\033[0m"; }
warning () { echo -e "\033[0;33m$@\033[0m"; }
info () { echo -e "\033[0m$@\033[0m"; }
# How to use it
ok "[OK] message" :: Green
error "Error message" :: Red
warning "~~" "Warning message" "~~" :: Yelow
info INFO message :: White color
Merge multiple swagger files
npx swagger-cli bundle -t yaml -o notifications.v3.bundle.yaml notifications.v3.yaml && \
npx swagger-cli validate notifications.v3.bundle.yamlUse fingerprint to run sudo
sudo vi /etc/pam.d/sudo
# Add pam_tim as first line
auth sufficient pam_tid.so