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
#!/usr/bin/env python | |
# | |
# Copyright (c) 2021 Sergei Eremenko (https://github.com/SmartFinn) | |
# | |
# Permission to use, copy, modify, and/or distribute this software for any | |
# purpose with or without fee is hereby granted. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | |
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | |
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, |
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/bash | |
# file: /etc/kernel/postinst.d/sign-kernel-longterm | |
# | |
# Create signing keys: | |
# | |
# openssl req -new -x509 -newkey rsa:4096 \ | |
# -keyout MOK.priv \ | |
# -outform DER -out MOK.der \ | |
# -nodes -days 36500 -subj "/CN=Descriptive Name/" | |
# |
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
function createHtmlTemplate(html) { | |
const template = document.createElement('template'); | |
template.innerHTML = html.trim(); | |
return template.content.firstElementChild; | |
} |
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/bash | |
# | |
# Description: Expose metrics from journald. | |
# | |
# Author: Sergei Eremenko (https://github.com/SmartFinn) | |
echo '# HELP journald_disk_usage Disk usage of all journal files in bytes.' | |
echo '# TYPE journald_disk_usage counter' | |
if [ -d /run/log/journal ]; then | |
echo 'journald_disk_usage{storage="temprary"}' \ |
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
#!/usr/bin/env bash | |
# Simple script that creates various directories to test your $LS_COLORS setup | |
set -euo pipefail | |
mkdir -p test | |
cd test | |
# File | |
touch FILE |
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
#!/usr/bin/env bash | |
# | |
# Copyright (c) 2021 Sergei Eremenko (https://github.com/SmartFinn) | |
# | |
# Permission to use, copy, modify, and/or distribute this software for any | |
# purpose with or without fee is hereby granted. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | |
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | |
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, |
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
#!/usr/bin/awk -f | |
# Copyright (c) 2020 Sergei Eremenko (https://github.com/SmartFinn) | |
# | |
# Permission to use, copy, modify, and/or distribute this software for any | |
# purpose with or without fee is hereby granted. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | |
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | |
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | |
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM |
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
/Makefile | |
/.rsyncignore |
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
# This script sends an email when a new user logged in the router | |
# | |
# Required permissions: | |
# | |
# [x] read [x] write | |
# [x] policy [x] test | |
# | |
# written by Sergei Eremenko (https://github.com/SmartFinn) | |
:global TokensOfLoggedUsers |
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
/** | |
Forward email marked with custom label to Telegram. | |
Sergei Eremenko (https://github.com/SmartFinn) © 2020 | |
**/ | |
// Custom trigger to run script every 1 min | |
function startCustomTrigger() { | |
ScriptApp.newTrigger('checkInbox').timeBased().everyMinutes(1).create() | |
} |
NewerOlder