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 / 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 / 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 / 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 / search_image_formula.js
Last active August 1, 2024 10:13
Add a logo in Google Sheets using Google Images search
=IFERROR(IMAGE(INDEX(IMPORTXML(CONCATENATE("https://www.google.com/search?q=";B6;" logo";"&tbm=isch"); "//img/@src"); 2; 1)))
@felipecustodio
felipecustodio / fix_wsl.ps1
Created October 3, 2023 11:48
Fix slow upload speeds when using WSL2 in Windows, due to LSO issues
# PowerShell script for WSL (Windows Subsystem for Linux) Configuration
Write-Host "==============================================="
Write-Host "Windows Subsystem for Linux (WSL) Configuration"
Write-Host "==============================================="
Write-Host ""
# Explanation of script actions
Write-Host "This script performs the following actions:"
Write-Host "1. Shuts down the WSL (Windows Subsystem for Linux)."
Write-Host "2. Disables IPv6 for the WSL virtual Ethernet adapter."
@felipecustodio
felipecustodio / compress.py
Created August 24, 2021 22:43
Reduce filesize of all images in directory
import glob, os
command = """
convert {original_file} \
-sampling-factor 4:2:0 \
-strip \
-quality 85 \
-interlace Plane \
-gaussian-blur 0.05 \
-colorspace RGB \
@felipecustodio
felipecustodio / conversion.py
Created June 8, 2021 17:53
networkx <-> igraph
def nx_to_ig(graph):
g = ig.Graph.TupleList(graph.edges(), directed=False)
return g
def ig_to_nx(graph):
A = graph.get_edgelist()
g = nx.Graph(A)
return g
@felipecustodio
felipecustodio / youtube.gs
Created June 2, 2021 19:21
Google Sheets: YouTube thumbnail
// A3 = video URL
=IFERROR(IMAGE(CONCATENATE("https://i3.ytimg.com/vi/", INDEX(SPLIT(A3, "="), 1, 2), "/maxresdefault.jpg")))
@felipecustodio
felipecustodio / create_directory.py
Last active April 21, 2021 21:10
create directory if doesn't exist
from pathlib import Path
directory = "hello"
Path(f"{directory}").mkdir(parents=True, exist_ok=True)
@felipecustodio
felipecustodio / style.css
Last active February 19, 2021 17:07
bettermotherfuckingwebsite + Braile's Atkinson Hyperlegible
body {
font-family: "Atkinson Hyperlegible";
margin: 40px auto;
max-width: 650px;
line-height: 1.6;
font-size: 18px;
background: #fffff8;
color: #111111;
padding: 0 10px
}