{
"default-address-pools" : [
{
"base" : "172.17.0.0/12",
"size" : 16
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 | |
# Environment Variables | |
CONTAINER_NAME="dev-postgres" | |
POSTGRES_IMAGE="postgres" | |
POSTGRES_PASSWORD="dev_password" | |
DATA_DIR="${HOME}/dev_postgres/" | |
# Display Help | |
Help() |
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 | |
# Define variables | |
REGION="eu-west-1" | |
PROFILE="default" | |
OUTPUT_FORMAT="json" | |
PERIOD_IN_SECONDS=3600 | |
STATISTIC="Maximum" | |
END_TIME=$(date -u "+%Y-%m-%dT%H:%M:%SZ") | |
START_TIME=$(date -u -v-7d "+%Y-%m-%dT%H:%M:%SZ") |
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 | |
# Define variables | |
REGION="eu-west-1" | |
PROFILE="default" | |
OUTPUT_FORMAT="json" | |
# Helper function to fetch and print results | |
function fetch_and_print { | |
local description=$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
#!/bin/bash | |
PROFILE="" | |
INSTANCE_ID="" | |
echo "Instance ID: $INSTANCE_ID" | |
echo "Fetching instance details..." | |
instance_details=$(aws --profile $PROFILE ec2 describe-instances --instance-ids "$INSTANCE_ID" --query 'Reservations[0].Instances[0]' --output json) | |
echo "Instance details fetched successfully." |
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 | |
# Author: Mahrous Amer | |
# Date: September 23, 2024 | |
set -euo pipefail | |
# Constants | |
BASE_URL='https://www.alphavantage.co' | |
CONFIG_FILE='config.conf' |
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
ARG GO_VERSION=1.20 | |
ARG BASE_IMAGE=golang:${GO_VERSION}-bullseye | |
ARG APP_NAME=app | |
ARG APP_PORT=3000 | |
FROM ${BASE_IMAGE} AS build | |
WORKDIR /app | |
COPY go.mod go.sum ./ |
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/perl -w | |
use strict; | |
use Socket; | |
use Getopt::Long; | |
use IO::Handle; | |
# Configuration | |
my $default_port = 7890; | |
my $default_host = 'localhost'; | |
my $backlog = 5; |