This little bash script helps you to build your own customized grml.iso
- Include your
.ssh/*.pub
files intoauthorized_keys
- Inject Grml Cheats
- Auto download all necessary files (the ISO and grml2usb)
substitutions: | |
devicename: room-sensor | |
esphome: | |
name: $devicename | |
platform: ESP32 | |
board: esp32-c3-devkitm-1 | |
wifi: | |
ssid: !secret wifi_ssid |
This little bash script helps you to build your own customized grml.iso
.ssh/*.pub
files into authorized_keys
# 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" |
Parses multipart/form-data
uploads and stream files to a blob-store.
After uploading the Services receives a json-body with the file references:
{
"files": [
{
"key": "34525ca2-f774-444f-8e7e-7622bef69cb1",
"filename": "13.jpg",
// deno run --allow-read json-log-view.ts log.txt | |
import { red, bold } from "https://deno.land/std@0.145.0/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(/^[^{]+/, '')); |
var app = require('express')(); | |
var GridStore = require('mongodb').GridStore; | |
var ObjectID = require('mongodb').ObjectID; | |
var MongoClient = require('mongodb').MongoClient; | |
var Server = require('mongodb').Server; | |
var dbConnection; | |
MongoClient.connect("mongodb://localhost:27017/ersatz?auto_reconnect", {journal: true}, function(err, db) { | |
dbConnection = db; | |
app.listen(3000); |
// controllers/LoginController.js | |
module.exports = { | |
index: function(req, res) { | |
var email = req.param('email'); | |
var password = req.param('password'); | |
// delay everthing to prevent bruteforce, dos and timing attacks | |
setTimeout(function() { |
#!/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 <wio@psitrax.de> | |
VERSION=1.0.0 | |
usage() { | |
echo "Mail Notifications for Icinga2 Host Alerts" |
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(); | |
}); | |
}); |
/** | |
* 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 |