Skip to content

Instantly share code, notes, and snippets.

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

Francisco Hidalgo lammoth

🏠
Working from home
View GitHub Profile
@clhenrick
clhenrick / README.md
Last active December 2, 2025 18:07
PostgreSQL & PostGIS cheatsheet (a work in progress)
@branneman
branneman / better-nodejs-require-paths.md
Last active December 5, 2025 02:17
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions