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
| sudo rm -f /usr/local/bin/mongosh | |
| hash -r | |
| curl -O https://downloads.mongodb.com/compass/mongodb-mongosh_2.5.9_amd64.deb | |
| sudo dpkg -i mongodb-mongosh_2.5.9_amd64.deb | |
| hash -r | |
| which mongosh | |
| sh .devcontainer/create-library-user.sh | |
| mongosh |
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
| // Define the JSON Schema for feature_type validation | |
| // This schema ensures that the "feature_type" field is required and must be a string | |
| // with one of the specified valid values. | |
| var ruleFeatureType = { | |
| "$jsonSchema": { | |
| "bsonType": "object", // The document must be an object | |
| "required": ["feature_type"], // The document must contain the "feature_type" field | |
| "properties": { | |
| "feature_type": { | |
| "bsonType": "string", // The "feature_type" field must be a string |
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
| // MongoDB Schema Validation Combined Rules Test | |
| // Run these commands in the MongoDB Shell | |
| // See https://gist.github.com/desteves/a9332232b7d0d2f7fc359ff0b051065a for ruleFeatureType definition. | |
| // See https://gist.github.com/desteves/49ab39f656f52275432e2ef3977bcb9f for ruleLatdecLondec definition. | |
| var newValidationSchema = { | |
| "$jsonSchema": { | |
| "allOf": [ ruleFeatureType.$jsonSchema, ruleLatdecLondec.$jsonSchema ] | |
| } |
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
| // Define the new JSON Schema for latdec and londec validation | |
| var ruleLatdecLondec = { | |
| "$jsonSchema": { | |
| "bsonType": "object", // The document must be an object | |
| "required": ["latdec", "londec"], // The document must contain latdec and londec | |
| "properties": { | |
| "latdec": { | |
| "bsonType": "double", | |
| "minimum": Double(-90), | |
| "maximum": Double(90) |
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
| // Define the JSON Schema for feature_type validation | |
| // This schema ensures that the "feature_type" field is required and must be a string | |
| // with one of the specified valid values. | |
| var ruleFeatureType = { | |
| "$jsonSchema": { | |
| "bsonType": "object", // The document must be an object | |
| "required": ["feature_type"], // The document must contain the "feature_type" field | |
| "properties": { | |
| "feature_type": { | |
| "bsonType": "string", // The "feature_type" field must be a string |
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
| #!/bin/sh | |
| # REPLACE THESE WITH YOUR VALUES | |
| PULUMI_ACCESS_TOKEN=pul-123 | |
| ORG=acme-corp | |
| # Get all stacks | |
| curl \ |
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
| #!/bin/sh | |
| # aws sso login --profile work | |
| time=$(date +%s) | |
| echo "Testing all programs -- $time" | |
| for program in $(ls -d */) ; do | |
| echo "Testing ${program}" | |
| cd ${program} | |
| mv go.mod.txt go.mod > /dev/null 2>&1 |
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
| #!/usr/bin/env bash | |
| # | |
| # gh-dl-release! It works! | |
| # | |
| # This script downloads an asset from latest or specific Github release of a | |
| # private repo. Feel free to extract more of the variables into command line | |
| # parameters. | |
| # | |
| # PREREQUISITES | |
| # |