Skip to content

Instantly share code, notes, and snippets.

View deadbok's full-sized avatar

Martin Bo Kristensen Grønholdt deadbok

  • Denmark
View GitHub Profile
#!/bin/sh
#
# dropBrute.sh by robzr
#
# minimalist OpenWRT/dropbear ssh brute force attack banning script
#
# Installation steps:
#
# 1) Optionally edit the variables in the header of this script to customise
# for your environment
@deadbok
deadbok / py2puml.py
Last active March 5, 2022 08:44
Program to create UML class diagrams from python files.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# --------------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# <martin.groenholdt@gmail.com> wrote this file. As long as you retain this notice
# you can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return. Martin B. K. Grønholdt
# --------------------------------------------------------------------------------
# Program to parse Python classes and write their info to PlantUML files
# (see http://plantuml.com/) that can be used to generate UML files and GraphViz
@deadbok
deadbok / mem_usage.sh
Last active March 19, 2021 12:34 — forked from igrr/mem_usage.sh
#!/bin/bash
# Orinial work by Ivan Grokhotkov.
# https://gist.github.com/igrr/43f8b8c3c4f883f980e5
#
# This version modified by Martin Grønholdt
# https://gist.github.com/deadbok/1e9a3fd78bdb854fd9b2
#
# Print data, rodata, bss sizes in bytes
#
# Usage:
@deadbok
deadbok / wpconfig.py
Created February 18, 2017 18:13
Python class to work with Wordpress wp-config.php
# -*- coding: utf-8 -*-
"""
Manipulate a wp-config.php file.
MIT License
Copyright (c) 2017 Martin Bo Kristensen Grønholdt
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@deadbok
deadbok / i2c-hd44780-pin-mapping
Last active March 3, 2018 21:13
Debian lcdproc patch to make pin mapping customisable in the HD44780 I2C driver.
Description: Patch to make the HD44870 pin mapping configurable in the I2C driver.
This patch makes it possible to customise the pin mapping for the HD44780
driver when using and I2C interface. The original sources are from https://github.com/wilberforce/lcdproc.
.
--- lcdproc-0.5.7.orig/clients/lcdproc/main.c
+++ lcdproc-0.5.7/clients/lcdproc/main.c
@@ -58,7 +58,7 @@ int Quit = 0;
int sock = -1;
char *version = VERSION;
@deadbok
deadbok / handin.tex
Created November 15, 2017 13:21
handin template for pandoc
% !TEX TS-program = xelatex
% !TEX encoding = UTF-8 Unicode
% -----------------
% START OF PREAMBLE
% -----------------
\documentclass[12pt,a4paper]{scrartcl}
% Commands
@deadbok
deadbok / README.md
Created May 14, 2017 23:48
Directory tree in a nice MarkDown unordered list.

MarkDown tree

tree command that outputs the tree in a nice MarkDown unordered list.

@deadbok
deadbok / kernel-4.9.6-gentoo-r1-ppc.config
Created April 9, 2017 10:45
Linux kernel configurtion for Gentoo on a PowerBook6,2 ppc.
#
# Automatically generated file; DO NOT EDIT.
# Linux/powerpc 4.9.6-gentoo-r1 Kernel Configuration
#
#
# Gentoo Linux
#
CONFIG_GENTOO_LINUX=y
CONFIG_GENTOO_LINUX_UDEV=y
@deadbok
deadbok / gist:155bd5906b30bc34b75180b240e326ac
Created February 3, 2017 23:41
Fabric file for deploying a flask installation including mongodb.
# -*- coding: utf-8 -*-
# Fabric file for deploying a flask installation including mongodb.
#
# Interesting tasks are:
#
# * purge: Remove everything but the application and the git repository.
# * purge_conf: Purge configurations.
# * purge_dep: Uninstall all packages.
# * deploy: Deploy the flask application to "/home/flask/*project_name*".
#### Contents of the preconfiguration file (for jessie)
### Localization
# Preseeding only locale sets language, country and locale.
d-i debian-installer/locale string en_GB
# The values can also be preseeded individually for greater flexibility.
#d-i debian-installer/language string en
#d-i debian-installer/country string NL
#d-i debian-installer/locale string en_GB.UTF-8
# Optionally specify additional locales to be generated.