Skip to content

Instantly share code, notes, and snippets.

View luisalima's full-sized avatar

Luisa Lima luisalima

View GitHub Profile
@luisalima
luisalima / README.md
Created November 6, 2026 15:53
Claude Code hook: never send your own email address off the machine (claude-code#107757)

no-own-email: a Claude Code hook

Blocks tool calls that would send your own email address off the machine: in a User-Agent, a URL, a header, a request body, a web/MCP tool call or a published page. Context: anthropics/claude-code#107757.

  • Reads your address at run time from ~/.claude.json (the signed-in account), git config --global user.email and optional WP_PRIVATE_EMAILS (comma-separated). No address is written in the file.
  • Matches any case, %40, [at], (at) and "name at domain".
  • Shell commands are blocked only when they also reach the network (curl, wget, http(s)://, urllib, requests,
@luisalima
luisalima / README.md
Created October 28, 2026 15:12
Pages that persuade agents: queries and pipeline (companion to luisalima.com field note)

Pages that persuade agents: queries and pipeline

Companion to the field note Dear agent: the pages that ask nicely.

Two small experiments looking for web pages that address AI agents directly, either with instructions (prompt injection) or with persuasion (social engineering). Everything runs through looot: Exa search, page fetch, and an LLM labeler via OpenRouter.

Files

File What it is
@luisalima
luisalima / TASKS_TRACKER.md
Created June 5, 2026 11:58
The tasks folder for project tracking

Spec — docs/tasks/ folder for project tracking

A flat, file-based system for tracking both work items and open questions in a single folder, using markdown + YAML frontmatter. Designed for small/medium projects where a Linear/Jira board would be overkill but informal TODOs are not enough.

Reproduce the structure exactly as described below. Write all user-facing text (README, index, task bodies) in the same language as the rest of the project's documentation — do not default to English if the project uses another language.


1. Folder layout

@luisalima
luisalima / AGENTS.md
Last active June 9, 2026 11:04
Coding Agent Operating Policy

Agent Operating Policy

1. TDD discipline — strict order

For any behavior with a clear, assertable contract (bug fixes, business logic, API or CLI behavior):

  1. Write the test that asserts the intent of the behavior.
  2. Run the suite. Confirm the new test fails — for the right reason (not a typo, import error, or unrelated failure).
@luisalima
luisalima / microgpt.py
Created February 12, 2026 12:32 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and inference a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@luisalima
luisalima / provision-pi.sh
Created February 21, 2019 10:44
A work in progress script to provision a raspberry pi with raspbian
#!/bin/bash
export HOSTNAME='***'
TOOLS="tmux"
COUNTRY="**"
SSID="***"
function change_hostname {
sudo sh -c "echo $HOSTNAME > /etc/hostname"
sudo sed -i "s/raspberrypi/$HOSTNAME/g" /etc/hosts

Keybase proof

I hereby claim:

  • I am luisalima on github.
  • I am luisalima (https://keybase.io/luisalima) on keybase.
  • I have a public key ASDJhuwOZQX6RCcbovR-py-NVzwoYeO0El1x2XJD_RTspQo

To claim this, I am signing this object:

@luisalima
luisalima / debuggingHandlebars
Last active July 7, 2016 15:52
Metalsmith step-by-step
Use `log` from handlebars v3 onwards:
http://stackoverflow.com/a/32218903
@luisalima
luisalima / right_left_shift_operators.rb
Created April 30, 2016 18:17
Right and left shift operators
# left shift operator is the equivalent of multiplying by a power of 2.
b = 1
(b << 1).to_s(2) # "10", equivalent to multiplying by 2^1
(b << 4).to_s(2) # "10000", equivalent to multiplying by 2^4
# right shift operator is the equivalent to integer divisin by 2.
b = 32
b.to_s(2) # "100000"
(b >> 1).to_s(2) # "10000", equivalent to dividing by 2
(b>>3).to_s(2) # "100", equivalent to dividing by 2^3
@luisalima
luisalima / bit_manipulation_swap.rb
Created April 30, 2016 18:08
Bit manipulation in Ruby
# swapping two integers, without using a temporary variable
a = 5 # 5
b = 7 # 7
a.to_s(2) # "101"
b.to_s(2) # "111"
a ^= b # a is now "010"
b ^= a # b is now "101"
a ^= b # a is now "111"