// Get TOP user agents https://www.npmjs.com/package/top-user-agents
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: '3' | |
services: | |
api: | |
build: back | |
volumes: | |
- ./back:/var/www/app | |
working_dir: /var/www/app/ | |
links: | |
- db | |
ports: |
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
AWSTemplateFormatVersion: '2010-09-09' | |
Description: 'lab-network-v1.0.0' | |
#Pre-requisitos | |
#Crear las siguientes Key Pair. Considerar la región indicada | |
# KeyPair: | |
# us-east-1 (N. Virginia): | |
# "dev": "key-dev-virginia" |
- the Registration Token for Specific project, or Group project (Recommend).
- AWS account with Policies (or permissions) to use cloudformation.
- EC2 key pair. Tutorial [here][https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html]
- With the registration token, we are going to register a new Runner and generate an <AUTHENTICATION_TOKEN>
- Run the next command in a terminal:
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
sam build --use-container && sam local start-api -n local_event.json |
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
/** | |
Based on | |
https://stackoverflow.com/questions/50035160/extract-variables-coeffcients-powers-from-a-polynomial-string-javascript#answers | |
*/ | |
function extractPolynomial(polynomialStr) { | |
let arr = []; | |
const eachMono = polynomialStr.match(/[+-]?\d*(x|y)(\^\d)*((y|x)(\^\d)*)*(\(([^()]*|\(([^()]*|\([^()]*\))*\))*\))?|[+-\s]\d+(\(([^()]*|\(([^()]*|\([^()]*\))*\))*\))?/g); | |
eachMono.forEach((match) => { |