Skip to content

Instantly share code, notes, and snippets.

View phjardas's full-sized avatar

Philipp Jardas phjardas

View GitHub Profile
@phjardas
phjardas / audit-request.ts
Last active July 28, 2021 09:37
Demo of authentication and authorization framework
import {
Action,
assertAllowed,
AuthContext,
getAvailableActions,
} from "./auth";
/**
* The domain object with some example fields.
*/
@phjardas
phjardas / .gitignore
Last active June 15, 2021 14:26
HelloSign Test
/node_modules
@phjardas
phjardas / bot.py
Created January 28, 2021 19:49
Telegram LED Matrix Display With Raspberry Pi
#!/usr/bin/env python
import logging
from luma.led_matrix.device import max7219
from luma.core.interface.serial import spi, noop
from luma.core.render import canvas
from luma.core.virtual import viewport
from luma.core.legacy import text, show_message
from luma.core.legacy.font import proportional, CP437_FONT
@phjardas
phjardas / README.md
Last active May 21, 2018 10:46
colors.js Webpack Test

colors.js webpack test

This is a little test to verify the bundleability of colors.js with Webpack. See Marak/colors.js#203 (comment) for details.

Broken

npm i colors@~1.2.0 && npm run build

While the output is correctly bundled in dist/index.js, the build (rightfully) emits the following warning:

@phjardas
phjardas / docker-machine-portainer.config.sh
Created September 30, 2017 10:19
This script will create a portainer configuration for a set of docker machines. The output will be a series of docker commands that you can simply execute against a manager node of your swarm.
#!/bin/bash -e
# This script will create a portainer configuration for a set of docker machines.
# The output will be a series of docker commands that you can simply execute against a manager node of your swarm.
#
# Usage: docker-machine-portainer.config.sh machine-0 machine-1 machine-2
secrets=""
for machine in "$@"; do