#!/bin/bash
# Load configuration from YAML (using yq to parse YAML)
CONFIG_FILE="/path/to/your/config.yaml"
# Function to get value from YAML
get_yaml_value() {
This file contains 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 numpy as np | |
import random | |
from scipy.io.wavfile import write | |
from scipy.signal import sawtooth, square | |
from pydub import AudioSegment, effects | |
import os | |
import hashlib | |
import librosa | |
from librosa.feature import mfcc | |
import concurrent.futures |
This file contains 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
# RAM Disk SSH Access Configuration | |
ram_disk: | |
enabled: true | |
mount_point: "/mnt/ramdisk" | |
size: "100M" # Adjust as necessary | |
permissions: | |
- "noexec" # Prevent execution of binaries | |
- "nosuid" # Disallow setting user IDs on files | |
- "nodev" # Disallow device files |
This file contains 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 the directory containing Apache error logs | |
LOG_DIR="/var/log/httpd/" # Adjust the path according to your configuration | |
# Define the temporary file path | |
TMP_DIR=$(mktemp -d) | |
TMP_LOG_FILE="$TMP_DIR/combined_error.log" | |
# Define the output file for the summary |
This file contains 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
version: '3' | |
services: | |
nginx: | |
image: nginx:latest | |
ports: | |
- "88:80" |
This file contains 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 | |
# requirements: wget, sudo | |
VERSION=v4.9.6 | |
BINARY=yq_linux_amd64 | |
wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY} -O yq | |
sudo mv yq /usr/local/bin/yq | |
sudo chmod +x /usr/local/bin/yq |
This file contains 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 | |
# Fetch metrics | |
metrics=$(curl -s http://127.0.0.1:60123/metrics) | |
# Define the metrics to be displayed | |
metric_names=( | |
"cloudflared_tcp_active_sessions" | |
"cloudflared_tunnel_active_streams" | |
"cloudflared_tunnel_ha_connections" |
This file contains 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
PyMod specializes in processing Python scripts, suggesting modularization, and providing complete refactoring suggestions without placeholders. When given a Python script, it will analyze the code, identify potential areas for modularization, and offer a detailed workflow and full code for implementation, always ensuring that existing functionalities are maintained. It can also help troubleshoot errors based on user feedback, suggesting fixes and improvements to ensure smooth refactoring. Responses should emphasize precision, accuracy, ease of debugging, and modularity. | |
When modularizing a script, PyMod will: | |
1. Create a new directory named similarly to the script being modularized, using a logical naming convention to avoid conflicts. | |
2. Ensure that the original script remains usable to maintain compatibility with other scripts that may call it. | |
3. Always manage the existing script in its position (which must be the root repo folder unless specified otherwise) and link it to its new folder and modularized s |
Difficoltà | Domanda | Livello di Dettaglio Tecnico | Risposta |
---|---|---|---|
Facile (1-5) | Cosa intendi per "Architettura di Soluzione"? | Basso | L'architettura di soluzione è un approccio per progettare, descrivere e gestire una soluzione tecnica completa. |
Puoi descrivere un recente progetto su cui hai lavorato e il tuo ruolo in esso? | Basso |
- Top 7 outages: https://readitquik.com/articles/cloud-3/top-7-aws-outages-that-wreaked-havoc/
- Main early outages: https://docs.google.com/spreadsheets/d/1Gcq_h760CgINKjuwj7WuRmLXHIdvsUdzNQCg0g4QvVs/edit?gid=0#gid=0
- Latest main outage: https://www.datacenterknowledge.com/outages/amazon-s-cloud-computing-service-experiences-regional-outage
- Example: https://aws.amazon.com/blogs/architecture/creating-a-multi-region-application-with-aws-services-part-1-compute-and-security/
- RDS read replica and promoting to Production for multi region DR: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RDS_Fea_Regions_DB-eng.Feature.CrossRegionReadReplicas.html
- Diagram: https://d2908q01vomqb2.cloudfront.net/fc074d501302eb2b93e2554793fcaf50b3bf7291/2022/03/31/Figure-4.-Building-an-application-with-AWS-multi-Region-services-using-services-covered-in-Part-1.png
- Multi-Region DR: https://d2908q01vomqb2.cloudfront.net/fc074d501302eb2b93e2554793fcaf50b3bf7291/2021/04/
NewerOlder