Skip to content

Instantly share code, notes, and snippets.

View vivek-dhayalan's full-sized avatar

Vivek Dhayalan vivek-dhayalan

View GitHub Profile
@vivek-dhayalan
vivek-dhayalan / cloudbuild.yml
Created February 15, 2023 08:01 — forked from sundarlogan/cloudbuild.yml
Building Cloud Native CI/CD Pipeline with GCP
steps:
# Remove last run test results
- id: remove-allure-results
name: gcr.io/cloud-builders/gsutil
entrypoint: "/bin/bash"
args: ["-c", "gsutil -m rm -r gs://$_GCS_BUCKET_PATH"]
allow_failure: true
# Getting the sub-module ui-tests
- id: git-submodule
| Expression | Meaning |
|----------------------------------------------------------------------------------------|---------------------------------------------------------------------------|
| ["answer", "Q1"] | Gets and returns the answer for the question Q1 |
| ["equals?", "Q1A1", ["answer", "Q1"] | Check if the answer for the question Q1 os "Q1A1". Returns true or false. |
| ["and", ["equals?", "Q1A1", ["answer", "Q1"]] , ["equals?", "Q2A1", ["answer", "Q2"]]] | Check if the answer for the question Q1 os "Q1A1". Returns true or false |
@vivek-dhayalan
vivek-dhayalan / SimpleSurvey.json
Last active March 20, 2022 06:17
A simple survey as json.
{
"questions": [
{
"qId": "Q1",
"options": [
{
"id": "Q1A1",
"displayOnSelect": "Q2"
},
{
{
"qId": "Q3",
"canDisplay": ["and", ["equals?", "Q1A1", ["answer", "Q1"]] , ["equals?", "Q2A1", ["answer", "Q2"]]],
"options": {
"id": "Q3A1"
}
}
import nisp from 'nisp'
var sandbox = {
'answer': (quid) => answers[quid],
'and': (e1, e2) => e1 && e2,
'equals?': (v1, v2) => v1 == v2
};
var exp = ["and", ["equals?", "Q1A1", ["answer", "Q1"]] , ["equals?", "Q2A1", ["answer", "Q2"] ]];
nisp(exp, sandbox);
local 631 MB
application 704 MB (contains node modules)
lib 481 MB
share 241 MB
.
.
.
@vivek-dhayalan
vivek-dhayalan / image_impact.csv
Created September 27, 2019 09:54
image impact table
REPOSITORY TAG IMAGE ID CREATED SIZE
app-static/ts 1 248f0e845f53 3 week ago 2.47GB
node 11 4051f768340f 3 week ago 904MB