apiVersion: v1
kind: ConfigMap
metadata:
name: my-configmap
data:
# The API URL for the app to use
API_URL: "https://api.example.com"
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 | |
set -eu pipefail # Set options for the shell | |
IFS=$'\n' # Set the Internal Field Separator to newline | |
# Array containing URLs of YouTube channels | |
CHANNEL_URLS=( | |
'https://www.youtube.com/@foo' | |
'https://www.youtube.com/@bar' | |
) |
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
# requires: pip install passlib | |
from passlib import hash | |
x = hash.sha512_crypt.hash("carlos", salt="neto", rounds=5000) | |
y = hash.sha512_crypt.hash("carlos", salt="xxx", rounds=5000) | |
print(hash.sha512_crypt.verify("carlos", x)) | |
# >>> true |
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
# simple example to echo button message content in slack interactive messages | |
# requires: | |
# slack_sdk | |
# flask | |
from slack_sdk import WebClient | |
from slack_sdk.errors import SlackApiError | |
from slack_sdk import WebClient | |
from flask import Flask, request | |
import json |
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
# rerquirements.txt | |
# pillow | |
from pathlib import Path | |
from PIL import Image | |
base_converted = Path('./converted') | |
base_path = Path('./images') | |
left = 0 |
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 | |
# Cloning all GitHub repositories belonging to a specific user provided as an argument. | |
# | |
# Command Execution Example: | |
# ./clone-all-repos-github.sh <USERNAME> | |
# | |
# Arguments: | |
# <USERNAME> GitHub username whose repositories will be cloned. | |
# |
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
# Stage for image creation for production | |
FROM maven:3-jdk-8 as builder | |
WORKDIR /app | |
# Setting the project's working directory for dependency installation | |
COPY application . | |
# Installing dependencies | |
RUN mvn -DskipTests=true clean |