Skip to content

Instantly share code, notes, and snippets.

View felipecustodio's full-sized avatar
🏠
Working from home

Felipe Custódio felipecustodio

🏠
Working from home
View GitHub Profile
@felipecustodio
felipecustodio / ynab-reset-all.js
Created August 1, 2024 10:12
Reset assigned amount for all previous months on YNAB, for a fresh start keeping the transactions categorized
// ==UserScript==
// @name YNAB - Reset Assigned Amounts on All Months
// @version 1.0.0
// @description Reset the assigned amounts on all months - Click the RAW button to install with Tampermonkey
// @author felipecustodio
// @match https://app.ynab.com/*
// @grant none
// @run-at document-end
// ==/UserScript==
@felipecustodio
felipecustodio / scrapy_command.js
Last active October 28, 2024 17:49
Generate Scrapy command on Zyte
// ==UserScript==
// @name Zyte Scrapy Command Generator
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Adds a button to generate and copy 'scrapy crawl' commands on Zyte
// @author Felipe Custódio
// @match https://app.zyte.com/p/*
// @grant none
// ==/UserScript==
(function() {
@felipecustodio
felipecustodio / style.md
Created March 15, 2025 06:40
Stylus + Violentmonkey prompt

Prompt for Custom Website Styling and Syntax Highlighting

Please analyze the HTML of the website I'm providing and create custom styling that enhances readability and aesthetics, along with a syntax highlighting script for code blocks. The goal is to transform the website into a more modern, readable experience while preserving its content and structure.

What I need:

  1. A custom Stylus CSS stylesheet that improves the overall design, typography, and readability
  2. A Violentmonkey/Tampermonkey JavaScript that adds syntax highlighting to code blocks

Specific requirements:

@felipecustodio
felipecustodio / .cursorrules
Created April 30, 2025 18:56
Cursor rules for my Python projects
## 1 · Core Principles
- **Mirror the repo** – follow existing structure, naming, and any code-style overrides in `pyproject.toml`.
- **Plan → edit → verify** – outline intent in chat, modify only planned sections, then run Make targets to lint, type-check, and test.
- **Read-only Git** – Can inspect diffs and logs but must **not** commit, push, or manipulate branches.
## 2 · Typing & Pydantic
- All public symbols are fully annotated; avoid `Any` unless strictly justified.
- Use modern syntax (`list[int]`, `X | Y`).
- Data objects are **Pydantic models** with `strict=True` and `Strict*` field types for safe coercion.
- Code must pass **Pyright** with zero errors.
@felipecustodio
felipecustodio / unwatch_repos.ps1
Created September 6, 2025 03:07
Worked somewhere, not anymore, but still subscribed to all the public repos? Here's a solution
$org = "YOUR_ORG_HERE"
# List org repos that you are subscribed to
$repos = gh api 'user/subscriptions?per_page=100' --paginate `
--jq ".[] | select(.owner.login==`"$org`") | .full_name"
if (-not $repos) { Write-Host "You’re not watching any $org repos."; exit }
# Unsubscribe
$repos | ForEach-Object {