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
#!/bin/sh | |
# Add "commitmsg": "./commitmsg.sh ${GIT_PARAMS}" to your package.json and use Husky to add it as a githook | |
TICKET=$(git symbolic-ref HEAD | rev | cut -d/ -f1 | rev | grep -o -E "[A-Z]+-[0-9]+") | |
if [ -n "${TICKET}" ]; then | |
# sed -e "1s/^/[${TICKET}] /" $1 | |
echo -n "[$TICKET]"' '|cat - "$1" > /tmp/out && mv /tmp/out "$1" | |
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
# 1 make your app listen on a port while serving (here we'll use the common 8100 port) | |
# 2 Run | |
sudo docker run -it -p 8100:8100 -v /local_project_folder:/docker_project_folder -e ENV_VAR=content -e ANOTHER_ENV_VAR=anothercontenxt image_name |
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
// Awesomeness first | |
const _ = require('lodash'); | |
const proxyquire = require('proxyquire'); | |
const sinon = require('sinon'); | |
// Mocha + Chai are used here but feel free to use your test framework of choice ! | |
const chai = require('chai'); | |
const chaiAsPromised = require('chai-as-promised'); | |
chai.use(chaiAsPromised); |
NewerOlder