This file contains hidden or 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
| function checkPM() | |
| { | |
| local lockFile=($(find . -maxdepth 1 -type f -iname '*lock*' | cut -c 3-)) | |
| local lockNumber=${#lockFile[@]} | |
| local packageManager=("package-lock.json" "yarn.lock" "pnpm-lock.yaml") | |
| local pmNumber=${#packageManager[@]} | |
| local packageInstaller=("npm" "yarn" "pnpm") | |
| if [ "${lockNumber}" -eq "1" ]; then | |
| for (( j=0; j<pmNumber; j++ )); |
This file contains hidden or 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 | |
| docker-compose up -d --build | |
| docker exec -ti appssotesting vendor/bin/behat |
This file contains hidden or 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
| // Sleep function : | |
| // https://stackoverflow.com/a/39914235 | |
| function sleep(ms) { | |
| return new Promise(resolve => setTimeout(resolve, ms)); | |
| } | |
| async function bulkRemove(nb) { | |
| for (var i = 0; i < nb; i++) { | |
| // Click on delete button | |
| $('.delete').click(); |
This file contains hidden or 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
| function docker-update() | |
| { | |
| docker images | grep -v REPOSITORY | awk '{print $1}' | xargs -L1 docker pull | |
| } |
This file contains hidden or 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
| function docker-rmimage() | |
| { | |
| docker rmi $(docker images -q) | |
| } |
This file contains hidden or 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
| function docker-ip() | |
| { | |
| local instance=$1 | |
| docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${instance} | |
| } |
This file contains hidden or 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
| ################################ | |
| ## GIT | |
| ############ | |
| function co | |
| { | |
| git checkout ${1} | |
| pull | |
| git st | |
| } |
This file contains hidden or 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
| function interceptFunction (object, fnName, options) { | |
| var noop = function () {}; | |
| var fnToWrap = object[fnName]; | |
| var before = options.before || noop; | |
| var after = options.after || noop; | |
| object[fnName] = function () { | |
| before.apply(this, arguments); | |
| var result = fnToWrap.apply(this, arguments); | |
| after.apply(this, arguments); |
This file contains hidden or 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
| function docker-exited() | |
| { | |
| local exited=$(docker ps --all -q -f status=exited) | |
| local exited_instance=$(docker ps --all -q -f status=exited | wc -l) | |
| if [[ ${exited_instance} -ge 1 ]]; then | |
| docker rm -vf ${exited} | |
| fi | |
| } |
This file contains hidden or 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
| function docker-undead() | |
| { | |
| local dead=$(docker ps --all -q -f status=dead) | |
| local dead_instance=$(docker ps --all -q -f status=dead | wc -l) | |
| if [[ ${dead_instance} -ge 1 ]]; then | |
| docker rm -vf ${dead} | |
| fi | |
| } |
NewerOlder