Skip to content

Instantly share code, notes, and snippets.

/**
* Code from:
* https://github.com/expressjs/express/pull/2809
*
* Target Express version: { "express": "^4.14.0 <5.0.0" }
*
* This monkey patch allows to return Promises from middleware and route handlers, rejections will be handled automaticaly.
*
* Please note:
* If you return something from `(...) -> void` callbacks - you shoot your own leg.
// https://github.com/kolodny/immutability-helper
/** Declaration extension point */
declare namespace ImmutabilityHelper {
interface CustomOperators<T> {
/* $someShit?: T */
/* $moreShit?: T */
}
}
@garkin
garkin / index.less
Last active November 27, 2017 07:36
less.js bug
@import (reference) "./referenced.less";
@garkin
garkin / docker-compose.yml
Created April 15, 2019 06:50
WeaveMesh v1 docker plugin force restart monitor
version: '3.7'
services:
monitor:
build: ./weave_monitor
image: custom/weave_monitor
network_mode: "none"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: always