Skip to content

Instantly share code, notes, and snippets.

View gusaiani's full-sized avatar

Gustavo Saiani gusaiani

View GitHub Profile
@gusaiani
gusaiani / SKILL.md
Created August 27, 2026 16:42
Claude Code /iq skill: answers laddered across eight cognitive tiers
name iq
description Answer a question as terse bullet points repeated at eight cognitive tiers (IQ 60, 70, 80, 90, 100, 120, 140, 160). Use when the user wants the same answer laddered from simplest to most sophisticated, or invokes /iq.
argument-hint <question> (optional; defaults to the question just asked in the conversation)
user-invocable true

IQ Ladder

Answer the question in $ARGUMENTS eight times, once per tier, as terse bullet points.

@gusaiani
gusaiani / SKILL.md
Created August 27, 2026 12:29
Claude Code /terse skill: answers capped at 140 characters
name terse
description Answer in 140 characters or less. Use when the user invokes /terse, or asks for extremely terse, one-line, no-fluff answers. Stays on for the rest of the session until turned off.
argument-hint <question> | on | off
user-invocable true

Terse Mode

Hard cap: 140 characters per reply. Count them. Under is better.

@gusaiani
gusaiani / bigram_shakespeare.py
Last active August 24, 2026 00:20
A language model in 40 lines of standard-library Python. It counts which character follows which in Shakespeare, then writes new text by sampling from those counts.
"""A language model in 40 lines, with no neural network in it.
It reads Shakespeare, counts which character follows which, and writes new text by
sampling from those counts. That is the whole idea behind every language model:
given what came before, put a probability on what comes next, pick one, repeat.
Standard library only. No pip install, no GPU, no API key. Runs on Python 3.9+.
python3 bigram_shakespeare.py
#!/bin/bash
# Narrate — stream text-to-speech with playback controls
# Usage:
# narrate <file> Read a file aloud
# narrate "some text" Read text aloud
# narrate pause Toggle play/pause
# narrate fwd Skip forward 30s
# narrate back Skip back 15s
# narrate stop Stop playback
# cat file | narrate Read piped text
#393939,#2D2D2D,#66ACAC,#FFFFFF,#515151,#E3E0D8,#99CC99,#fb4934
@gusaiani
gusaiani / flattenArbitrarilyDeepArray.js
Last active July 4, 2018 17:09
The ES6 function below flattens an arbitrarily deep array.
function flattenArbitrarilyDeepArray(arr, cache = []) {
return arr.reduce((acc, item) => {
if (Array.isArray(item)) {
acc.concat(flattenArbitrarilyDeepArray(item, acc))
}
else acc.push(item)
return acc
}, cache)
}
@gusaiani
gusaiani / .gitignore_global
Last active July 20, 2018 20:49
My gitignore_global
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@gusaiani
gusaiani / vimium-options.json
Last active October 23, 2024 02:09
Vimium setup for Colemak keyboard
{
"settingsVersion": "1.64",
"exclusionRules": [
{
"pattern": "https?://mail.google.com/*",
"passKeys": ""
},
{
"pattern": "https?://toggl.com/*",
"passKeys": "n"

Keybase proof

I hereby claim:

  • I am gusaiani on github.
  • I am gusaiani (https://keybase.io/gusaiani) on keybase.
  • I have a public key ASC2AHkmg49Tv28OjDfSoxAthD-O7nd2RmFHmmluxB6VEwo

To claim this, I am signing this object:

@gusaiani
gusaiani / gusaiani.plugin.zsh
Last active November 17, 2022 21:53
ZSH Initializer
mkcd() {
dir="$*"
mkdir -p "$dir" && cd "$dir"
}
cpwd() {
pwd | pbcopy
}
alias gcne='git commit --amend --no-edit'