Skip to content

Instantly share code, notes, and snippets.

View scorphus's full-sized avatar
Brewing at 🏡 office

Pablo Aguiar scorphus

Brewing at 🏡 office
View GitHub Profile
@scorphus
scorphus / glance-quicklook-font.md
Created June 25, 2026 08:58
Customizing Glance Quick Look font on macOS (and re-signing the extension so it still loads)

Customizing Glance Quick Look font (and re-signing so it still loads)

Glance is an all-in-one macOS Quick Look plugin (source code, markdown, JSON, archives, Jupyter, etc.) with dark-mode support. It has no settings UI — the fonts/sizes are hardcoded in CSS inside the app bundle. You can edit them, but on Apple Silicon any edit invalidates the extension's code signature, so it must be re-signed correctly or macOS will silently stop loading the Quick Look extension.

Where the styles live

@scorphus
scorphus / _stravatize.md
Last active June 15, 2026 12:39
stravatize — send komoot tours straight to the other orange app (bookmarklet)

stravatize

Send a komoot tour straight to the other orange app — one tap, no subscription on either side. komootloose's mischievous sibling.

What it does

Click the bookmarklet while on the other app's website (logged in), paste a komoot tour link or ID — public and link-shared tours both work — and it rebuilds the tour as a native route in your account, then takes you straight to it. Everything runs in your browser with your own session; nothing is sent anywhere else.

Install

@scorphus
scorphus / config
Created October 29, 2025 09:30
Ghostty Config
# ~/.config/ghostty/config
# The syntax is "key = value". The whitespace around the equals doesn't matter.
# Empty values reset the configuration to the default value
# Comments start with a `#` and are only valid on their own line.
# Blank lines are ignored!
background = 000000
foreground = ebebeb
@scorphus
scorphus / README.md
Last active September 3, 2023 18:10
Haystack brew formula in the works

Homebrew Formula for Haystack

Installing the Formula

  1. Copy it to the Formula/h subdirectory of the homebrew/core repository. Use the following command to display the path of such repository on the file system:

    brew --repository homebrew/core
    
diff --git a/setup.py b/setup.py
index 4e6d848..b20b920 100644
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ with open(os.path.join(_BASE_DIR, 'README.md')) as readme_file:
setup(
name='boilerpy3',
version=__version__,
- python_requires='>=3.6.*',
+ python_requires='>=3.6',
@scorphus
scorphus / shortest_reach.ex
Created August 7, 2023 19:43
Breadth First Search: Shortest Reach
defmodule ShortestReach do
def main do
IO.gets("")
|> String.trim()
|> String.to_integer()
|> shortest_reach()
end
defp shortest_reach(0) do
end
@scorphus
scorphus / mobprog.md
Last active January 24, 2022 19:09
The Dynamics of Mob Programming

The Dynamics of Mob Programming

In a nutshell

![dynamics of mob programming][mobprog.svg]

Before you start:

  • Make sure you have [whatchexec][] installed
  • Checkout the working branch
@scorphus
scorphus / application.py
Created April 2, 2021 15:56
Hacking FastAPI + Redoc
from openapi import get_redoc_html
def serve_docs_route():
return get_redoc_html("openapi_url", "title")
@scorphus
scorphus / pattern_matching.py
Created February 18, 2021 23:10
Pattern Matching in Python
with open("/usr/share/dict/words") as words:
for word in map(str.rstrip, words):
for letter in word:
match letter:
case "a" | "b" | "c" | "d" | "e" | "f":
continue
case _:
break
else:
print(word)
@scorphus
scorphus / playground.rs
Created October 11, 2020 22:30
All possible combinations of shades and opacities
fn main() {
for shade in 0..242 {
let opacity = 13f32 / (255f32 - shade as f32);
println!("opacity:{:0.3};fill:#{:06x}", opacity, shade * 65793);
}
}