This file contains 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
#To clear containers | |
docker rm -f $(docker ps -a -q) | |
#To clear images: | |
docker rmi $(docker images -q -f dangling=true) | |
docker rmi $(docker images -q) | |
#To clear volumes: | |
docker volume rm $(docker volume ls -qf dangling=true) | |
#To clear networks: | |
docker network rm $(docker network ls | tail -n+2 | awk '{if($2 !~ /bridge|none|host/){ print $1 }}') |
This file contains 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
react-native-sound | |
react-native-vector-icons | |
react-native-elements | |
react-native-fast-image | |
react-native-image-picker | |
react-native-document-picker | |
react-native-gesture-handler | |
react-native-reanimated | |
reanimated-bottom-sheet | |
react-native-video |
This file contains 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
exports.deleteUser = async (req, res, next) { | |
const session = await mongoose.startSession(); | |
try { | |
const { id } = req.params; | |
// Start session | |
await session.startTransaction(); | |
// deleteMany in this session | |
const [errorOp, result] = await toAll([App.deleteMany({ user: id }).session(session), UserModel.findByIdAndRemove(id).session(session)]); | |
if (errorOp) { | |
throw new ErrorRequest(STATUS_CODE.UNPROCESSABLE, errorOp.message); |
This file contains 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 | |
CONTAINER_NAME="$1" | |
PROJECT_NAME="app" | |
# lets find the first container | |
FIRST_NUM=`docker ps | awk '{print $NF}' | grep app_$CONTAINER_NAME | awk -F "_" '{print $NF}' | sort | head -1` | |
NUM_OF_CONTAINERS=1 | |
MAX_NUM_OF_CONTAINERS=2 |
This file contains 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
import { JWE, JWK, JWS } from 'node-jose' | |
import fs from 'fs' | |
import { join } from 'path' | |
import jwkToPem from 'jwk-to-pem' | |
import jwt from 'jsonwebtoken' | |
const certDir = '.cert' | |
const keystoreFile = join(certDir, 'keystore.json') | |
const raw = { | |
iss: 'test', |