Skip to content

Instantly share code, notes, and snippets.

View rlueder's full-sized avatar
🤘
Focusing

Rafael Lüder rlueder

🤘
Focusing
View GitHub Profile
@rlueder
rlueder / CLAUDE.md
Created March 10, 2026 01:17
My CLAUDE.md for personal projects

Instructions for Claude

DO NOT use "You're absolutely right", find some other expression to say, keep your tone professional and positive without unnecessary excitement.

Hierarchical Guidelines

This project uses multiple CLAUDE.md files for domain-specific guidelines:

File Content
@rlueder
rlueder / claude-code-pr-workflow.md
Created March 9, 2026 20:06
Automated PR Reviews with Claude Opus on AWS Bedrock — GitHub Actions workflow

Automated PR Reviews with Claude Opus on AWS Bedrock

A GitHub Actions workflow that uses Claude Opus (via AWS Bedrock) to automatically review pull requests with inline comments.

Features

  • Two-round review system — Round 1 reviews the full diff, Round 2 only reviews changes made after Round 1 (to address feedback). No further reviews after Round 2.
  • Inline PR comments — Feedback is posted as review comments on specific file/line, not just a wall of text.
  • Cost tracking — Each review comment includes token usage and estimated cost.
  • Smart skipping — Docs/config-only PRs are skipped automatically.
@rlueder
rlueder / useMousePosition.tsx
Last active August 27, 2024 14:33
A React hook that exposes the user's mouse position
import { useCallback, useRef, useState } from "react";
const useMousePosition = () => {
const [mousePosition, setMousePosition] = useState({
left: 0,
top: 0,
});
const handleMouseMove = useCallback(
(e) =>
/**
* @name debounce
* @summary Debounces "func" within "wait".
* @see {@link https://davidwalsh.name/javascript-debounce-function}
* @see {@link https://www.freecodecamp.org/news/javascript-debounce-example/}
* @example <button onClick={debounce(() => console.log("1s"), 1000)}>Debounce</button>
* @param {Function} func
* @param {number} [wait]
* @returns {Function}
*/
@rlueder
rlueder / encode-decode-base64
Created December 8, 2017 17:45
encode/decode strings to/from base64 on the terminal
// Encode
echo -n 'username:password' | openssl base64
// dXNlcm5hbWU6cGFzc3dvcmQ=
// Decode
echo `echo dXNlcm5hbWU6cGFzc3dvcmQ= | base64 --decode`
// username:password
@rlueder
rlueder / log-tab-focus.js
Created August 28, 2017 19:44 — forked from ryanve/log-tab-focus.js
Log :focus element each time tab key is pressed
document.addEventListener('keyup', function(e) {
9 != e.keyCode || e.metaKey || e.ctrlKey || console.log(document.activeElement)
}, false)
@rlueder
rlueder / rename.js
Last active May 17, 2024 01:56 — forked from microbial/rename.js
lodash helpers - rename (renames object keys)
/*
* var person = { firstName: 'bill', lastName: 'johnson' }
*
* person = _.rename(person, 'firstName', 'first')
* person = _.rename(person, 'lastName', 'last')
*
* console.log(person) // { first: 'bill', last: 'johnson' }
*/
_.rename = (obj, key, newKey) => {