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
var s3Zip = require('s3-zip') | |
var listObjects = function (opts) { | |
return new Promise (function (resolve, reject) { | |
var keys = [] | |
var getKeys = function (token) { | |
if (token) { | |
opts.ContinuationToken = token | |
} else { | |
delete opts.ContinuationToken |
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
version: '2' | |
services: | |
app: | |
env_file: .env | |
build: . | |
ports: | |
- "7000:7000" | |
depends_on: | |
- postgres | |
environment: |
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
FROM node:10.16 | |
# Create app directory | |
WORKDIR /usr/src/app | |
# Install app dependencies | |
COPY package*.json ./ | |
RUN npm install | |
# Bundle app source |
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
# Example usage: | |
# ./pre-processing.sh <path-to-dir-with-jpg-images> | |
#!/bin/bash | |
output=$1"/" | |
res="224:224" | |
for j in $(ls -C1 "$output") | |
do | |
ffmpeg -i "$output"/"$j" -vf scale=$res "$output"/"$res"_"$j" |
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
router.get('/api/v1/foobars', getFoobars); | |
router.get('/api/v1/foobars/baz/:baz', getFoobarsForBaz); | |
function getFoobars(req, res) { | |
var queryString = "select * from foobar;"; | |
executeQuery(res, queryString); | |
} | |
function getFoobarsForBaz(req, res){ | |
var queryString = "select * from foobar where baz = $1;"; |