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 | |
# Exit on any error | |
set -e | |
# Function to print status messages | |
print_status() { | |
echo "===> $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 | |
# Check if script is run as root | |
if [ "$EUID" -ne 0 ]; then | |
echo "Please run as root (use sudo)" | |
exit 1 | |
fi | |
echo "Setting ulimit..." | |
ulimit -n 524288 |
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 | |
# Function to handle keyboard input | |
function select_option { | |
# Initialize variables | |
local selected=0 | |
local options=("$@") | |
local key="" | |
# Hide cursor |
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 | |
# Ubuntu-22.04-LXC-Desktop Setup Script | |
# Exit on any error | |
set -e | |
# Function to print messages | |
print_message() { | |
echo "===== $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 | |
set -x # Enable debug mode | |
# Check if correct number of arguments are provided | |
if [ "$#" -ne 3 ]; then | |
echo "Usage: $0 <obsidian_file> <hugo_content_dir> <hugo_post_name>" | |
exit 1 | |
fi |
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 | |
# Create a temporary file | |
temp_file=$(mktemp) | |
# Concatenate all non-empty .md files in the current directory, adding titles and separators | |
for file in *.md; do | |
if [ -f "$file" ] && [ -s "$file" ] && ! [ -z "$(grep -v '^[[:space:]]*$' "$file")" ]; then | |
echo -e "\n====== $file ======\n" >> "$temp_file" | |
cat "$file" >> "$temp_file" |