Skip to content

Instantly share code, notes, and snippets.

View mlgarchery's full-sized avatar
🧙‍♂️
Building mammouth.ai

Martial Garchery mlgarchery

🧙‍♂️
Building mammouth.ai
View GitHub Profile
@mlgarchery
mlgarchery / SQLITE->Neon.md
Last active March 25, 2025 16:45
Migrate from a SQLite database to a Postgres database

Migrating from SQLite (D1) to PostgreSQL (Neon)

As D1, a sqlite-compatible DB from Cloudflare, is limited to a maximum of 10GB, I needed to migrate my database to one that is famously capable of handling a numerous number of rows.

To export it I used the wrangler CLI:

npx wrangler d1 export my-db --remote --output="db.sql"
@mlgarchery
mlgarchery / better_git_config.md
Last active April 11, 2025 13:19
Better git aliases for `git log` and `git branch`

When you merge branches, you can be confused by the output git log gives you sometimes. The main issue is that by default git log use chronological order and not topological order --topo-order, which is the order of the commits when they appeared on their respective branch. This is disturbing to me. Look at it by youself:

image

The idea is to replace your daily use of git log with git l that use the --topo-order option.