Skip to content

Instantly share code, notes, and snippets.

@ozkanpakdil
ozkanpakdil / aurora_setup.sh
Last active December 12, 2024 12:43
Create Aurora postgresql cluster where execution/query plans configured from scratch
#!/bin/bash
set -ex
# This script creates an Aurora PostgreSQL DB cluster and instance, applies a custom parameter group to enable auto explain for all queries/execution plans, and creates a database and user.
# It uses the AWS CLI to interact with Amazon RDS, and the `psql` command-line tool to execute SQL commands.
# Assumes that `psql` is installed and in the system PATH, and that AWS credentials are set as environment variables.
# Usage: ./PrepareAuroraPostgreSql.sh <SubnetGroupName>
Jekyll to Hugo Markdown Converter (with folder structure preservation)
Modified version of fredrikloch/JekyllToHugo to:
Recursively convert .markdown files to Hugo-compatible .md format
Preserve year-based folder structure from Jekyll source
Handle malformed YAML frontmatter gracefully
Useful for migrating large Jekyll collections into Hugo with minimal cleanup.
find . -type f -name "*.markdown" -exec bash -c 'for f; do mv -- "$f" "${f%.markdown}.md"; done' _ {} +