Skip to content

Instantly share code, notes, and snippets.

View luisalima's full-sized avatar

Luisa Lima luisalima

View GitHub Profile
@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"
@luisalima
luisalima / 0_reuse_code.js
Created August 14, 2014 09:59
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@luisalima
luisalima / bla.rb
Created December 20, 2012 20:14
Trying to validate a boolean in ActiveRecord
# == Schema Information
#
# Table name: Bla
# test :boolean
class Bla < ActiveRecord::Base
attr_accessible :test
before_validation :test_present
def test_present
puts "TEST PRESENT"