Skip to content

Instantly share code, notes, and snippets.

View phcostabh's full-sized avatar
🧑‍💻
Coding

Philippe Santana Costa phcostabh

🧑‍💻
Coding
View GitHub Profile
@devill
devill / HABIT_HOOKS_MICROFEATURE.md
Last active May 5, 2026 05:11
Habit Hooks Microfeature

Habit Hooks Microfeature

A language-agnostic blueprint for implementing automated quality enforcement that integrates with AI coding agents.

Philosophy

Habit Hooks simulates human habit forming by introducing deterministic reminders for predetermined short action plans. Just as humans develop good habits through consistent, repeated cues followed by small actions, this system trains AI agents to automatically respond to quality signals with specific, rehearsed fixes.

The key insight: habits form when a cue reliably triggers a practiced response. Habit Hooks provides the cue (the agent prompt marker) and the practiced response (the action guidance), creating a feedback loop that reinforces quality-focused behavior.

@devill
devill / learn.md
Last active April 13, 2026 07:04
Learn skill for claude

Learn

Reflect on session learnings and capture them appropriately.

Reflect

Answer: "What is it you wish you had known at the start of this session?"

Consider:

  • Gotchas encountered
@iamnolanhu
iamnolanhu / CHATGPT VERSION (GPT-4 | GPT-4.1)
Created June 18, 2025 13:39
REALITY FILTER — A LIGHTWEIGHT TOOL TO REDUCE LLM FICTION WITHOUT PROMISING PERFECTION
✅ REALITY FILTER — CHATGPT
• Never present generated, inferred, speculated, or deduced content as fact.
• If you cannot verify something directly, say:
- “I cannot verify this.”
- “I do not have access to that information.”
- “My knowledge base does not contain that.”
• Label unverified content at the start of a sentence:
- [Inference] [Speculation] [Unverified]
• Ask for clarification if information is missing. Do not guess or fill gaps.
@schacon
schacon / better-git-branch.sh
Created January 13, 2024 18:41
Better Git Branch output
#!/bin/bash
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NO_COLOR='\033[0m'
@rponte
rponte / using-uuid-as-pk.md
Last active June 8, 2026 16:53
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes

@FilBot3
FilBot3 / python-zeep-example.md
Last active November 17, 2024 09:09
Python Zeep SOAP Example Write Up

Python Zeep SOAP Client

First, we'll look at the SOAP URL and see what Prefixes, Global Elements, Global Types, Bindings, and Services are provided by the SOAP Service.

You can do this by running zeep as a CLI tool.

export WSDL_URL="http://www.dneonline.com/calculator.asmx?WSDL"
python -m zeep $WSDL_URL
/* The error handling library */
type ResultError<E> = {
errors: E,
trace?: any
}
type Success<T> = {
value: T
}
@Ocramius
Ocramius / psalm-compendium.php
Last active April 23, 2025 01:22
A small compendium of what is possible with `vimeo/psalm` 3.9.x to add some decent type system features to PHP
<?php
// -- types are a compile-time propagated concept
// https://psalm.dev/r/338f74a96c
class TheType
{
/** @var string */
public $foo = 'bar';
}
<?php
declare(strict_types=1);
/**
* @psalm-template TKey
* @psalm-template TValue
* @psalm-param iterable<TKey, TValue> $list
* @psalm-param callable(TValue): bool $filter
* @psalm-return Generator<TKey, TValue>
*/
@NWCalvank
NWCalvank / fp.js
Created April 29, 2018 15:34
Transducers Explained | JavaScript
module.exports = {
compose,
concat,
};
function apply(x, f) {
return f(x);
}
function compose(...funcs) {