#002B36,#002B36,#073642,#FDF6E3,#657B83,#FDF6E3,#859900,#2AA198,#002B36,#FDF6E3
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 python3 | |
| # Demonstrates the use of Python to work with Cognito. | |
| # Create a new a user, log in, check tokens and call an API. | |
| # The purpose was to learn about Cognito. Security has been | |
| # circumvented in the interest of keeping it simple. | |
| # Notably, the authentication procedure uses the most insecure | |
| # method. This code is not intended for use in production. | |
| # | |
| # https://www.neant.ro/aws/working-with-cognito-and-api-gateway-in-python.html |
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 socket | |
| import json | |
| def lambda_handler(event, context): | |
| return { | |
| 'statusCode': 200, | |
| 'body': json.dumps(socket.gethostbyname('www.google.com')) | |
| } |
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
| # gitlab ci template for terraform with webidentity role | |
| # https://docs.gitlab.com/ee/ci/cloud_services/aws/ for how to setup gitlab oidc in aws. | |
| # | |
| # assuming it is a monorepo with vpc/dev and vpc/prod | |
| # assuming AWS_IAM_ROLE_DEV and AWS_IAM_ROLE_PROD with role arn as values configured in the CI/CD settings | |
| # | |
| # setup step is to setup working dir and pass role arn | |
| # validate step is to validate terraform | |
| # terraform plan step runs on any other branch except in main | |
| # terraform apply step runs only on main branch |
I hereby claim:
- I am tsoe77 on github.
- I am tsoe77 (https://keybase.io/tsoe77) on keybase.
- I have a public key ASDIbvKv97xEtxuQSbdEBFDeXBjA1jlahI1nehHCZXZxqQo
To claim this, I am signing this object:
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
| repos: | |
| - repo: https://github.com/pre-commit/pre-commit-hooks | |
| rev: v3.2.0 | |
| hooks: | |
| - id: trailing-whitespace | |
| - id: check-yaml | |
| - id: check-added-large-files | |
| - repo: https://github.com/antonbabenko/pre-commit-terraform | |
| rev: v1.76.0 | |
| hooks: |
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
| apiVersion: v1 | |
| kind: Pod | |
| metadata: | |
| name: postgres | |
| labels: | |
| app: postgres | |
| spec: | |
| containers: | |
| - name: postgres | |
| image: postgres:latest |
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
| #010409,#121016,#2C323F,#c9d1d9,#0D1117,#b1bac4,#56d364,#f85149,#010409,#b1bac4 |
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 json | |
| import sys | |
| import os | |
| def dotenv_to_json(dotenv_path, json_path): | |
| with open(dotenv_path) as f: | |
| data = f.readlines() | |
| result = {} | |
| for line in data: |
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
| Solarized | |
| #FDF6E3,#EEE8D5,#93A1A1,#FDF6E3,#EEE8D5,#657B83,#2AA198,#DC322F | |
| Solarized Dark | |
| #073642,#002B36,#B58900,#FDF6E3,#CB4B16,#FDF6E3,#2AA198,#DC322F | |
OlderNewer