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
| const customFlatten = (arr) => { | |
| return arr.reduce((initFlat, toFlat) => { | |
| return initFlat.concat(Array.isArray(toFlat) ? customFlatten(toFlat) : toFlat); | |
| }, []) | |
| }; |
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
| // create dump from remote service not using local pg client | |
| docker exec -i postgres_container bash -c "pg_dump --dbname=postgresql://$PGUSER:$PGPASSWORD@$PGHOST:$PGPORT/$PGDB" > /asbolute/direction/path/dump.sql | |
| // for apply dump on the local db | |
| docker exec -i postgres_container psql -U postgres local_db_name < /Users/vampyar/Projects/Careclix/dump.sql |
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
| export $(egrep -v '^#' .env | xargs) |
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
| find . -type d -name node_modules -prune -o -name 'package.json' -exec dirname {} \; | xargs -I{} sh -c 'cd "{}" && npm i' |