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 | |
SHELL = /bin/bash | |
PYTHON_EXE = python3 | |
TOPDIR = $(shell git rev-parse --show-toplevel) | |
all: venv ## Build complete environment | |
help: # Display help | |
@awk -F ':|##' \ | |
'/^[^\t].+?:.*?##/ {\ |
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 | |
# | |
# Do initial configuration of a SP111 plug on your local wifi | |
# | |
# Licensed under the GPLv3+ | |
# | |
TEMPLATE='{"NAME":"SP111 v1.1","GPIO":[56,0,158,0,132,134,0,0,131,17,0,21,0],"FLAG":0,"BASE":45}' | |
function uriencode { |
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 python3 | |
# | |
# Forgot the password for my keepass library. I knew the password | |
# was based on a certain scheme that encodes the year etc. | |
# | |
# Rather than trying it out by hand, have a program do it for me. | |
# | |
# Quick and dirty... | |
# |
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 | |
set -euo pipefail | |
MAX_SYS_UID=499 | |
MAX_SYS_GID=499 | |
ORIG_MAX_SYS_UID=999 | |
ORIG_MAX_SYS_GID=999 | |
# For debugging, set to echo |
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
root@GL-X750:~# picocom --echo /dev/ttyUSB2 | |
picocom v1.7 | |
port is : /dev/ttyUSB2 | |
flowcontrol : none | |
baudrate is : 9600 | |
parity is : none | |
databits are : 8 | |
escape is : C-a |
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
// ==UserScript== | |
// @name document.load client injection | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description The Avocent PM1000/2000/3000 PDU runs an old JavaScript interface that relies on the XMLDocument.fetch() function that has been removed. Emulate this. | |
// @description inject the document.load implementation into real page context. | |
// @author Andreas Thienemann <andreas@bawue.net>, based on a script from jnd@chromium.org, based on idea from gurreiro_fabio@yahoo.com.br | |
// @match http://172.16.10.64/* | |
// @match http://172.16.10.65/* | |
// @run-at document-start |
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 | |
set -euo pipefail | |
# | |
# Use the Cisco IMC XML Interface to generate a CSR, use dehydrated to | |
# have this signed and upload the resulting cert back to the IMC. | |
# This script requires a working dehydrated setup, preferably using the | |
# DNS-01 ACME protocol. | |
# |
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
/* | |
* Copyright (c) 2006 Proofpoint, Inc. and its suppliers. | |
* All rights reserved. | |
* | |
* By using this file, you agree to the terms and conditions set | |
* forth in the LICENSE file which can be found at the top level of | |
* the sendmail distribution. | |
* | |
* $Id: example.c,v 8.5 2013-11-22 20:51:36 ca Exp $ | |
*/ |
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/python3 | |
import asyncio | |
from aiosmtpd.controller import Controller | |
from aiosmtpd.smtp import SMTP | |
from pprint import pprint | |
import email | |
import smtplib | |
import string | |
import random |
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
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*- | |
# vi: set ft=python sts=4 ts=4 sw=4 noet : | |
# (c) Andreas Thienemann 2017 | |
# | |
# Fail2Ban is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# |