Skip to content

Instantly share code, notes, and snippets.

import os
import csv
import tempfile
import uuid
import time
import boto3
from datetime import datetime
class LambdaMetricsLogger:
def __init__(self):
curl -sSL https://gist.githubusercontent.com/recalde/ed998db824e2b95e987961d32f08412a/raw/steamdeck_cleanup.sh | bash
#!/bin/bash
set -euo pipefail
LAYER_NAME="pyarrow-layer"
PYTHON_VERSION="3.11"
TARGET_DIR="$(pwd)/layer_build"
OUTPUT_ZIP="pyarrow-layer.zip"
IMAGE_TAG="${LAYER_NAME}-builder"
@recalde
recalde / README.md
Created May 30, 2025 00:28
README.md

🧠 README.md

Emotional Intelligence (EQ) – A Self-Audit

Hi, I'm Rob. I spend a lot of time building systems, solving complex problems, and occasionally forgetting that people are not containers that respond to kubectl apply.

This is my semi-sarcastic, slightly painful, and reasonably accurate self-audit of how my emotional intelligence functions in the wild — especially when my intentions don’t quite match how I’m perceived.


📊 The EQ Matrix

🔍 What's My "Why"? A Personal Reflection on Curiosity and Craft

I recently watched a short clip on YouTube that asked a powerful question:

"What is your why?"

Why do you do what you do professionally?
What motivates you?
What do you take pride in?

@recalde
recalde / prompt.txt
Created May 16, 2025 23:40
Code Style Prompt
Reusable Code Style Prompt
When writing code for me, please follow these principles:
General Style Preferences
Prioritize clarity, correctness, and simplicity.
Code should be concise but not cryptic — use clear, descriptive variable names.
@recalde
recalde / _prompt.md
Last active May 13, 2025 22:17
PostParq

Write a Python program that connects to a PostgreSQL database using host, port, user, password, and schema name. The program should:

  • Loop over each day between a given BEGIN_DATE and END_DATE (formatted as YYYYMMDD). Each date represents a value for the calc_dt column.

  • For each day:

    • Identify all tables in the given schema that contain a column named calc_dt.
    • For each matching table:
      • Check if it has a primary key column that is a single bigint with an auto-increment default (PostgreSQL sequence). If so, sort exports by calc_dt and this primary key. If not, sort by calc_dt only.
      • Select all rows from the table where calc_dt = current_date, and export to a Parquet file named {table}_{calc_dt}.parquet.
  • Use snappy compression for a good balance of speed and file size.

@recalde
recalde / perf-test.sh
Created April 9, 2025 15:19
perf-test.sh
#!/bin/bash
set -e
echo "[Startup] Measuring host compute power..."
# CPU Test
START=$(date +%s%N)
for i in {1..100000}; do echo "$i" | sha256sum > /dev/null; done
END=$(date +%s%N)
CPU_MS=$(( (END - START) / 1000000 ))
@recalde
recalde / cert-check.py
Last active April 4, 2025 11:37
Certificate Check
import ssl
import socket
import requests
from urllib.parse import urljoin
from cryptography import x509
from cryptography.hazmat.backends import default_backend
from bs4 import BeautifulSoup
import hashlib
def fetch_ssl_chain(domain, port=443):
@recalde
recalde / clean-pom.sh
Last active April 1, 2025 14:45
Clean Maven POM XML Files
#!/bin/bash
set -e
MAVEN_VERSION=3.9.6
MAVEN_DIR="$HOME/.maven/apache-maven-$MAVEN_VERSION"
MAVEN_BIN="$MAVEN_DIR/bin/mvn"
echo "=== Checking Java ==="
if ! command -v java >/dev/null 2>&1; then