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/bash | |
| mkfs -t xfs /dev/xvdh | |
| mkdir /mnt/volume2 | |
| mount -t xfs /dev/xvdh /mnt/volume2 | |
| echo "/dev/xvdh /mnt/volume2 xfs defaults 0 0" > /etc/fstab |
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
| AWSTemplateFormatVersion: 2010-09-09 | |
| Description: >- | |
| AWS CloudFormation Sample Template EIP_With_Association: This template | |
| creates an Amazon EC2 instance and an Elastic IP Address. You will be | |
| billed for the AWS resources used if you create a stack from this template. | |
| Parameters: | |
| InstanceType: | |
| Description: Web Server EC2 instance type | |
| Type: String | |
| Default: t2.small |
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
| #cloud-config | |
| repo_update: true | |
| repo_upgrade: all | |
| packages: | |
| - docker | |
| - jq | |
| - htop | |
| runcmd: |
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: Remote Dispatch Action | |
| on: [ repository_dispatch, workflow_dispatch ] | |
| jobs: | |
| update-version: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Event Information |
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: Container Build CICD | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: org/container-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
| #!/usr/bin/env python | |
| ##### THIS IS A DESTRUCTIVE SCRIPT - USE WITH CAUTION OR SET DryRun=True | |
| import datetime | |
| import sys | |
| import boto3 | |
| # Set these two variables before running: |
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
| AWSTemplateFormatVersion: '2010-09-09' | |
| Description: 'Simple CloudFront distribution with an S3 origin' | |
| Parameters: | |
| S3BucketName: | |
| Type: String | |
| Description: The name for the S3 bucket - must be unique across all of AWS | |
| AllowedPattern: '^[a-z0-9]{5,40}$' | |
| Resources: |
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 python:3 | |
| ADD helloworld.py / | |
| RUN pip install flask | |
| RUN pip install flask_restful | |
| EXPOSE 80 | |
| CMD [ "python", "./helloworld.py"] |
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 | |
| import os | |
| import requests | |
| from fastapi import FastAPI | |
| from typing import Optional | |
| from pydantic import BaseModel | |
| app = FastAPI() |
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/bash | |
| jq --slurp --raw-input --raw-output \ | |
| 'split("\n") | .[1:] | map(split(",")) | | |
| map({"id": .[0], | |
| "fname": .[1], | |
| "lname": .[2], | |
| "email": .[3], | |
| "ipv4": .[5]})' \ | |
| mock_data.csv > mock_data.json |