Skip to content

Instantly share code, notes, and snippets.

View daaa1k's full-sized avatar

d4k1 daaa1k

View GitHub Profile
@daaa1k
daaa1k / oc-commit-msg
Created February 23, 2026 08:51
Generate Commit Message with OpenCode
#!/usr/bin/env bash
set -euo pipefail
diff=$(git diff --cached)
if [[ -z "$diff" ]]; then
echo "Error: No staged changes found." >&2
exit 1
fi
tmpfile=$(mktemp /tmp/oc-diff-XXXXXX)
@daaa1k
daaa1k / cc-commit-msg
Last active February 23, 2026 08:51
Generate Commit Message with Claude Code
#!/usr/bin/env bash
set -euo pipefail
diff=$(git diff --cached)
if [[ -z "$diff" ]]; then
echo "Error: No staged changes found." >&2
exit 1
fi
PROMPT='Analyze the following git diff and generate a Conventional Commits message.
CREATE TABLE alb_log AS
SELECT *
FROM read_csv(
'/<folder path>/*.log.gz',
columns={
'type': 'VARCHAR',
'timestamp': 'TIMESTAMP',
'elb': 'VARCHAR',
'client_ip_port': 'VARCHAR',
'target_ip_port': 'VARCHAR',
@daaa1k
daaa1k / Dockerfile
Last active March 14, 2026 12:05
Dockerfile for python AWS lambda with uv
FROM public.ecr.aws/lambda/python:3.12
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
ENV PATH="/app/.venv/bin:$PATH"
ENV UV_CACHE_DIR=/tmp/.uv_cache
COPY lambda_function.py logging.conf pyproject.toml uv.lock pytest.ini ${LAMBDA_TASK_ROOT}/
COPY tests ${LAMBDA_TASK_ROOT}/tests/
# test with all dependencies