Skip to content

Instantly share code, notes, and snippets.

View jendrikw's full-sized avatar

Jendrik jendrikw

  • Germany
  • 02:03 (UTC +02:00)
View GitHub Profile
@mosquito
mosquito / README.md
Last active May 10, 2024 20:44
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@hmaurer
hmaurer / better-nodejs-require-paths.md
Created March 24, 2017 10:51 — forked from branneman/better-nodejs-require-paths.md
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:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions