$ gpg --full-generate-keyKey size: 4096
| import { parse } from 'csv-parse/sync' | |
| import { promises as fs} from 'fs' | |
| import { v4 as uuid } from 'uuid' | |
| const decodeDesc = (desc) => desc.split('\n').reduce((result, line) => { | |
| if (line.startsWith('- [x] ')) { | |
| result.checkboxes.push({ | |
| id: uuid(), | |
| title: line.replace("- [x] ", ""), | |
| checked: true |
| #!/bin/sh | |
| # Error function | |
| die() { echo "error: $@" 1>&2 ; exit 1; } | |
| confDie() { echo "error: $@ Check the server configuration!" 1>&2 ; exit 2; } | |
| # Set global variables | |
| export DEPLOY_KEY=/run/secrets/private_deploy_key | |
| # Validate global configuration |
| /* | |
| Usage : | |
| + This is a simple Teleinfo Test program | |
| + It's just to test the TeleInfo board and its | |
| connexion to the EDF counter | |
| + It just displays the received teleInfo data on | |
| the Serial Monitor | |
| + No Internet connexion, no data transfered | |
| Hardware needed : |
| #!/bin/sh | |
| # Functions | |
| die() { echo "error: $@" 1>&2 ; exit 1; } | |
| confDie() { echo "error: $@ Check the server configuration!" 1>&2 ; exit 2; } | |
| debug() { | |
| [ "$debug" = "true" ] && echo "debug: $@" | |
| } | |
| # Validate global configuration |
| .SILENT : | |
| .PHONY : all help clean | |
| PASSWORD:=$(shell cat .password) | |
| DAYS:=1460 | |
| SUBECT:=blab.in | |
| CERTIFICATE:=ca.pem |
| version: "3" | |
| services: | |
| ####################################### | |
| # Metrics collector: Telegraf | |
| ####################################### | |
| telegraf: | |
| image: telegraf:alpine | |
| restart: always | |
| environment: | |
| - "HOST_PROC=/rootfs/proc" |
| # Install PIP | |
| curl -LO https://bootstrap.pypa.io/get-pip.py | |
| python get-pip.py --user | |
| export PATH=$HOME/.local/bin:$PATH | |
| # Install ansible | |
| pip install ansible --user | |
| # Run ansible | |
| ansible --version |
| #!/usr/bin/python | |
| import os | |
| from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer | |
| PORT_NUMBER = os.getenv('APP_PORT', 8080) | |
| #This class will handles any incoming request from | |
| #the browser | |
| class myHandler(BaseHTTPRequestHandler): | |
| #Handler for the GET requests |