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
| { | |
| "python.defaultInterpreterPath": "/Users/demo/.pyenv/versions/3.8.10/envs/3.8/bin/python", | |
| "python.pythonPath": "/usr/local/anaconda3/bin/python", | |
| "python.terminal.activateEnvironment": true, | |
| "terminal.integrated.inheritEnv": true, | |
| "workbench.colorTheme": "Predawn", | |
| "redhat.telemetry.enabled": false, | |
| "code-runner.runInTerminal": true, | |
| "python.linting.pylintArgs": [ | |
| "--reports", |
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 base64 | |
| import boto3 | |
| REGION_NAME = "us-east-2" | |
| # Decrypt value using AWS KMS Key | |
| kmsclient = boto3.client('kms', region_name=REGION_NAME) | |
| ciphertext = "encryted_value" |
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
| from multiprocessing import Pool | |
| import os | |
| import time | |
| list_of_movie_names = ["john_wick_1", "john_wick_1", "john_wick_3"] | |
| def hello_world(name): | |
| print("IT WASN'T JUST A PUPPY") | |
| time.sleep(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
| from multiprocessing import Pool | |
| import os | |
| import time | |
| def hello_world(name): | |
| print("IT WASN'T JUST A PUPPY") | |
| time.sleep(1) | |
| print('YOU WANTED ME BACK...') | |
| return f"Hello: {name}" |
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
| name: Security Scans | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - main | |
| paths-ignore: | |
| - 'README.md' | |
| - 'LICENSE' |
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
| # NOTE: Ensure you are logged into the right github account | |
| # https://cli.github.com/manual/gh_auth_login | |
| OWNER=tomarv2 | |
| REPO=demo | |
| # list all workflows | |
| gh api -X GET /repos/$OWNER/$REPO/actions/workflows | jq '.workflows[] | .name,.id' | |
| # get the workflow id you want to clear |
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
| name: Security Scans | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| paths-ignore: | |
| - 'README.md' | |
| - 'LICENSE' |
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
| package test | |
| import ( | |
| "testing" | |
| "github.com/gruntwork-io/terratest/modules/aws" | |
| "github.com/gruntwork-io/terratest/modules/terraform" | |
| "github.com/stretchr/testify/assert" | |
| ) |
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
| # ----------------------------------------------------- | |
| # Cleanup git history | |
| # ----------------------------------------------------- | |
| # NOTE: DO NOT DELETE the .git folder it may cause problems in git repository. | |
| # If we want to delete commits history, but keep the code, please try below: | |
| # Check out to a temporary branch: | |
| git checkout --orphan temp_branch |
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
| # from: https://cloud.google.com/secret-manager/docs/managing-secrets | |
| from google.cloud import secretmanager | |
| project_id = "demo_project_id" | |
| secret_name = "hello" | |
| version = 1 | |
| def access_secret_version(project_id, secret_id, version_id): |
NewerOlder