Skip to content

Instantly share code, notes, and snippets.

View Myllaume's full-sized avatar

Guillaume Brioudes Myllaume

View GitHub Profile
@infologie
infologie / documentation.css
Last active March 11, 2021 14:47
Modèle Pandoc pour page HTML avec sommaire cliquable. Pensé pour de la documentation logicielle (manuel d'utilisation).
/* VARIABLES */
:root {
--sans: "Helvetica Neue", Helvetica, sans-serif;
--serif: Georgia, serif;
--mono: Menlo, Monaco, Consolas, "Courier New", monospace;
--code-background-color: #f5f5f5;
--code-border-color: #ccc;
font-size: 100%;
}
@branneman
branneman / better-nodejs-require-paths.md
Last active October 18, 2024 20:29
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