Skip to content

Instantly share code, notes, and snippets.

View hmarcelodn's full-sized avatar

Hugo Marcelo Del Negro hmarcelodn

  • Melon Technologies
  • Argentina
View GitHub Profile
@hmarcelodn
hmarcelodn / thl-grammar.pegjs
Created May 24, 2022 21:19
thl-grammar.pegjs-10
AndCondition = head:ConditionStatement tail:(_ '&&' _ ConditionStatement)+ {
const accum = [{...head}];
tail.reduce((accumulated, element) => {
accumulated.push(element[3]);
return accumulated;
}, accum);
return { op: '&&', predicates: accum };
} / ConditionStatement
@hmarcelodn
hmarcelodn / thl-grammar.pegjs
Created May 24, 2022 21:19
thl-grammar.pegjs-09
OrCondition = head:AndCondition tail:(_ '||' _ AndCondition)+ {
const accum = [{...head}];
tail.reduce((accumulated, element) => {
accumulated.push(element[3]);
return accumulated;
}, accum);
return { op: '||', predicates: accum };
} / AndCondition
@hmarcelodn
hmarcelodn / thl-grammar.pegjs
Created May 24, 2022 21:14
thl-grammar.pegjs-07
FunctionStatement =
func:AllFunctionTokens _
"("param: (QuestionToken/String/FunctionStatement)")"
{
return {
functionStatement: {
func,
param,
}
};
@hmarcelodn
hmarcelodn / thl-grammar.pegjs
Last active May 24, 2022 21:13
thl-grammar.pegjs-06
ConditionalBooleanStatement
=
"[" _ "if condition" _ "=" _ "'"
conditional: OrCondition
"'" _ "]"
body1: Code _
"[else]"* _
body2: Code _
"[/if]" {
return {
@hmarcelodn
hmarcelodn / thl-grammar.pegjs
Created May 24, 2022 21:08
thl-grammar.pegjs-05
TocToken = "[toc]"
@hmarcelodn
hmarcelodn / thl-grammar.pegjs
Created May 24, 2022 21:06
thl-grammar.pegjs-04
UnderlineToken = "[u]" / "[/u]"
@hmarcelodn
hmarcelodn / thl-grammar.pegjs
Created May 24, 2022 21:02
thl-grammar.pegjs-03
ConstantToken = "[c#" id:[0-9]+ "]" {
return "[c#" + id.join('') + "]";
}
@hmarcelodn
hmarcelodn / thl-grammar.pegjs
Created May 24, 2022 20:45
thl-grammar.pegjs-01
start = Code
Code = token:(
QuestionToken /
VariableToken /
ConstantToken /
UnderlineToken /
TocToken /
HighlightToken /
ConditionalBooleanStatement /
#!/bin/bash
# Create release revision
AWS_VERSION_LABEL="${AWS_ENVIRONMENT_SUFFIX}-release-`date +%Y%m%d-%H%M%S`"
AWS_BUNDLE_NAME="${AWS_VERSION_LABEL}.zip"
# Download Environment Variables
echo "Downloading frontend environment variables for ${AWS_ENVIRONMENT_SUFFIX}..."
aws s3 cp s3://${AWS_S3_BUCKET_NAME}/environment/.env.frontend.${AWS_ENVIRONMENT_SUFFIX} ./apps/mudbay-storeopsportal-fe/.env
#-------------------------------
# AWS Provider
#-------------------------------
provider "aws" {
profile = "default"
region = "us-east-2"
}
#-------------------------------
# Elastic Beanstalk Application