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 AWS = require('aws-sdk'); | |
const rekognition = new AWS.Rekognition(); | |
//Analyze image. | |
const analyzeImg = (image) => rekognition.detectFaces(image).promise(); | |
//Decode image. | |
const decodeImage = (image64)=>{ | |
return { |
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 a sleep function using promise. | |
* @param {number} ms - duration time in milliseconds. | |
*/ | |
const sleep = (ms) => new Promise(resolve => setTimeout(()=>resolve({time:ms}), ms)); | |
/** | |
* Loop until have the success condition. | |
* @param {function} condition - boolean function that return the condition. | |
* @param {number} timeout - limit execution time. |
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 a sleep function using promise. | |
* @param {number} ms - duration time in milliseconds. | |
*/ | |
const sleep = (ms) => new Promise(resolve => setTimeout(()=>resolve({time:ms}), ms)); | |
/** | |
* Loop until have the success condition. | |
* @param {function} condition - boolean function that return the condition. | |
* @param {number} timeout - limit execution time. |
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
import 'dart:convert'; | |
void main(){ | |
var nombre = 'Damian'; | |
var empresa = 'My drugs'; | |
int precio = 100; | |
double pi = 3.141592; | |
bool activado = true; |
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
stages: | |
- test | |
- build | |
- deploy | |
- notify | |
run_test: | |
stage: test | |
image: node:10.16.0-alpine | |
script: |
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
stages: | |
- test | |
- build | |
- deploy | |
- notify | |
run_test: | |
stage: test | |
image: cirrusci/flutter:stable | |
script: |
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
version: "2" | |
services: | |
home: | |
container_name: home-service | |
restart: always | |
build: ./home-service | |
ports: | |
- "172.24.0.1:5000:8080" | |
clients: | |
container_name: clients-service |
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 assert = require('assert'); | |
const createError = require('http-errors'); | |
/* | |
Receive a dni and gender 'M' or 'F' and return his cuil. | |
Params | |
document : number -> dni | |
gender : string | |
Returns | |
string -> cuil | |
*/ |
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 AWS = require('aws-sdk'); | |
//Define aws region | |
AWS.config.update({ | |
region:'us-east-1' | |
}); | |
const TABLE = 'landing_page_emails'; |
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 Joi = require('joi'); | |
//Schemas. | |
const googleSchema = Joi.object({ | |
avatar:Joi.string().uri(), | |
email:Joi.string().email(), | |
name:Joi.string() | |
}); | |
const blockedSchema = Joi.object({ |