This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
substitutions: | |
devicename: room-sensor | |
esphome: | |
name: $devicename | |
platform: ESP32 | |
board: esp32-c3-devkitm-1 | |
wifi: | |
ssid: !secret wifi_ssid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// deno run --allow-read json-log-view.ts log.txt | |
import { red, bold } from "https://deno.land/[email protected]/fmt/colors.ts"; | |
const text = await Deno.readTextFile(Deno.args[0]); | |
const lines = text.split(/\r?\n/).filter(l => l.length > 0); | |
const objs = lines.map(l => { | |
const res = JSON.parse(l); | |
if (res.message.includes('{\"Exception\"')) { | |
res.message = JSON.parse(res.message.replace(/^[^{]+/, '')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Database migration helper using Umzug | |
* supports TypeScript (ts-node) and JS | |
* | |
* Usage: | |
* * With ts-node: npx ts-node src/db-migrate.ts | |
* * or after transpile: node src/db-migrate.js | |
* | |
* Params: | |
* * down: Downgrade the last migration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Meta c brings Chrom(e|ium) to foreground | |
"~/.dotfiles/window-activator.sh -a Chrom" | |
Mod4+c | |
# Meta k brings Konsole to foreground | |
"~/.dotfiles/window-activator.sh -a Konsole" | |
Mod4+k | |
# Meta k brings WebStorm to foreground | |
"~/.dotfiles/window-activator.sh -a WebStorm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const auth = require('@feathersjs/authentication'); | |
const errors = require('@feathersjs/errors'); | |
const bcrypt = require('bcryptjs'); | |
const comparePasswords = (oldPassword, password) => new Promise((resolve, reject) => { | |
bcrypt.compare(oldPassword, password, (err, data1) => { | |
if(err || !data1) return reject(); | |
return resolve(); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Ajv = require('ajv'); | |
const ajvKeywords = require('ajv-keywords'); | |
const ajvAsync = require('ajv-async'); | |
const errors = require('@feathersjs/errors'); | |
const app = require('../app'); | |
module.exports = function validateSchemaHookFactory(schema, options) { | |
const patch = options && options.patch; | |
if(options) delete options.patch; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
mysql: | |
image: mariadb | |
restart: unless-stopped | |
environment: | |
MYSQL_ROOT_PASSWORD: ${MYSQL_PASS} | |
volumes: | |
- "./mysql:/var/lib/mysql" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Mail Notification Script for Icinga2 Hosts | |
# Uses swaks for mail delivery: http://www.jetmore.org/john/code/swaks/ | |
# Date: 2017-01-19 | |
# Author: Christoph Wiechert <[email protected]> | |
VERSION=1.0.0 | |
usage() { | |
echo "Mail Notifications for Icinga2 Host Alerts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
pdns: | |
image: andryyy/mailcow-dockerized:pdns | |
volumes: | |
- ./data/conf/pdns/:/etc/powerdns/ | |
restart: unless-stopped | |
networks: | |
mailcow-network: |
NewerOlder