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 | |
""" | |
fetch_file.py - Fetch a single file from DNS TXT records | |
Usage: python3 fetch_file.py <filename> [output_directory] [index_hostname] | |
Environment: PORKBUN_INDEX (default: index) | |
""" | |
import argparse | |
import json |
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 pwsh | |
# fetch-file.ps1 - Fetch a single file from DNS TXT records | |
# Usage: .\fetch-file.ps1 <filename> [output_directory] | |
param( | |
[Parameter(Mandatory=$true)] | |
[string]$Filename, | |
[Parameter(Mandatory=$false)] |
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 | |
# fetch-file.sh - Fetch a single file from DNS TXT records | |
# Usage: ./fetch-file.sh <filename> [output_directory] | |
set -e | |
# Check if filename is provided | |
if [ "$#" -lt 1 ] || [ "$#" -gt 2 ]; then | |
echo "Usage: $0 <filename> [output_directory]" >&2 |
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
// Project structure: | |
// - pom.xml | |
// - src/main/java/com/example/dualkafka/ | |
// - DualKafkaApplication.java (Main application class) | |
// - config/ | |
// - FirstKafkaConfig.java (First Kafka broker config) | |
// - SecondKafkaConfig.java (Second Kafka broker config) | |
// - listener/ | |
// - FirstKafkaListener.java (Listener for first broker) | |
// - SecondKafkaListener.java (Listener for second broker) |
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
(defvar-local lainedev-edit-indirect-leading-spaces 0) | |
(defun lainedev--leading-spaces () | |
(interactive) | |
(let* ((current-line (thing-at-point 'line 't)) | |
(line-length (length current-line)) | |
(trimmed-line (replace-regexp-in-string "^ +" "" current-line)) | |
(trimmed-line-length (length trimmed-line))) | |
(- line-length trimmed-line-length))) |