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
@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
#### 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.
@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 / 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 / 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*".
@deadbok
deadbok / linux_cheat_sheet.md
Last active November 28, 2016 14:27
Linux command prompt cheat sheet

Linux command prompt cheat sheet

Terminology

Everything enclosed in * characters are placeholders for the arguments that you need in your particular case.

Mount, mount point. etc

To make a drive, actually a partition on a physical drive, available in

,*.php *.bak .htaccess
wp-admin,*.php
wp-admin/css,*.css
wp-admin/css/colors,*.css *.scss
wp-admin/css/colors/blue,*.css *.scss
wp-admin/css/colors/coffee,*.css *.scss
wp-admin/css/colors/ectoplasm,*.css *.scss
wp-admin/css/colors/light,*.css *.scss
wp-admin/css/colors/midnight,*.css *.scss
wp-admin/css/colors/ocean,*.css *.scss